Explorar o código

remove old linkedin tokens

mk200789 %!s(int64=10) %!d(string=hai) anos
achega
02d2154110
Modificáronse 100 ficheiros con 6931 adicións e 0 borrados
  1. 14 0
      .hgignore
  2. 390 0
      .pylintrc
  3. 155 0
      README.md
  4. 35 0
      angular/addons/footer.html
  5. 19 0
      angular/addons/nav.html
  6. 22 0
      angular/bower.json
  7. 176 0
      angular/css/main.css
  8. 99 0
      angular/index.html
  9. 301 0
      angular/js/jquery.navgoco.js
  10. 29 0
      angular/partials/githubTopContributions.partial.html
  11. 40 0
      angular/partials/githubUser.partial.html
  12. 43 0
      angular/partials/instagramUser.partial.html
  13. 29 0
      angular/partials/snippets.partial.html
  14. 34 0
      angular/partials/steamSales.partial.html
  15. 54 0
      angular/scripts/app.js
  16. 13 0
      angular/scripts/controllers/appController.js
  17. 10 0
      angular/scripts/controllers/githubTopContributionsController.js
  18. 10 0
      angular/scripts/controllers/githubUserController.js
  19. 19 0
      angular/scripts/controllers/instagramUserController.js
  20. 10 0
      angular/scripts/controllers/restAppController.js
  21. 10 0
      angular/scripts/controllers/steamSalesController.js
  22. 12 0
      angular/scripts/factories/githubTopContributionsFactory.js
  23. 12 0
      angular/scripts/factories/githubUserFactory.js
  24. 12 0
      angular/scripts/factories/instagramUserFactory.js
  25. 12 0
      angular/scripts/factories/instagramUserMediaFactory.js
  26. 12 0
      angular/scripts/factories/restAppFactory.js
  27. 12 0
      angular/scripts/factories/steamSalesFactory.js
  28. 21 0
      bower.json
  29. 32 0
      gulpfile.js
  30. 192 0
      hackathon_starter/Makefile
  31. 293 0
      hackathon_starter/conf.py
  32. 0 0
      hackathon_starter/hackathon/__init__.py
  33. 15 0
      hackathon_starter/hackathon/admin.py
  34. 11 0
      hackathon_starter/hackathon/forms.py
  35. 0 0
      hackathon_starter/hackathon/migrations/__init__.py
  36. 69 0
      hackathon_starter/hackathon/models.py
  37. 390 0
      hackathon_starter/hackathon/scripts/.pylintrc
  38. 0 0
      hackathon_starter/hackathon/scripts/__init__.py
  39. 371 0
      hackathon_starter/hackathon/scripts/github.py
  40. 248 0
      hackathon_starter/hackathon/scripts/instagram.py
  41. 62 0
      hackathon_starter/hackathon/scripts/linkedin.py
  42. 24 0
      hackathon_starter/hackathon/scripts/meetup.py
  43. 22 0
      hackathon_starter/hackathon/scripts/nytimes.py
  44. 27 0
      hackathon_starter/hackathon/scripts/quandl.py
  45. 121 0
      hackathon_starter/hackathon/scripts/scraper.py
  46. 55 0
      hackathon_starter/hackathon/scripts/steam.py
  47. 151 0
      hackathon_starter/hackathon/scripts/tumblr.py
  48. 19 0
      hackathon_starter/hackathon/scripts/twilioapi.py
  49. 304 0
      hackathon_starter/hackathon/scripts/twitter.py
  50. 44 0
      hackathon_starter/hackathon/scripts/yelp.py
  51. 9 0
      hackathon_starter/hackathon/serializers.py
  52. 26 0
      hackathon_starter/hackathon/static/css/form.css
  53. BIN=BIN
      hackathon_starter/hackathon/static/img/github.png
  54. BIN=BIN
      hackathon_starter/hackathon/static/img/linkedin.jpg
  55. BIN=BIN
      hackathon_starter/hackathon/static/img/steam.png
  56. BIN=BIN
      hackathon_starter/hackathon/static/img/tumblr.png
  57. 23 0
      hackathon_starter/hackathon/templates/hackathon/api_examples.html
  58. 61 0
      hackathon_starter/hackathon/templates/hackathon/base.html
  59. 109 0
      hackathon_starter/hackathon/templates/hackathon/facebook.html
  60. 62 0
      hackathon_starter/hackathon/templates/hackathon/github.html
  61. 110 0
      hackathon_starter/hackathon/templates/hackathon/githubResume.html
  62. 51 0
      hackathon_starter/hackathon/templates/hackathon/githubTopRepositories.html
  63. 14 0
      hackathon_starter/hackathon/templates/hackathon/index.html
  64. 30 0
      hackathon_starter/hackathon/templates/hackathon/instagram.html
  65. 39 0
      hackathon_starter/hackathon/templates/hackathon/instagram_q.html
  66. 44 0
      hackathon_starter/hackathon/templates/hackathon/linkedin.html
  67. 51 0
      hackathon_starter/hackathon/templates/hackathon/login.html
  68. 36 0
      hackathon_starter/hackathon/templates/hackathon/meetup.html
  69. 40 0
      hackathon_starter/hackathon/templates/hackathon/navbar.html
  70. 61 0
      hackathon_starter/hackathon/templates/hackathon/nytimes.html
  71. 87 0
      hackathon_starter/hackathon/templates/hackathon/quandl.html
  72. 42 0
      hackathon_starter/hackathon/templates/hackathon/register.html
  73. 31 0
      hackathon_starter/hackathon/templates/hackathon/steam.html
  74. 60 0
      hackathon_starter/hackathon/templates/hackathon/tumblr.html
  75. 31 0
      hackathon_starter/hackathon/templates/hackathon/twilio.html
  76. 45 0
      hackathon_starter/hackathon/templates/hackathon/twitter.html
  77. 60 0
      hackathon_starter/hackathon/templates/hackathon/twitter_tweet.html
  78. 58 0
      hackathon_starter/hackathon/templates/hackathon/yelp.html
  79. 135 0
      hackathon_starter/hackathon/tests.py
  80. 0 0
      hackathon_starter/hackathon/unittests/__init__.py
  81. 8 0
      hackathon_starter/hackathon/unittests/testcase.py
  82. 192 0
      hackathon_starter/hackathon/unittests/testgithub.py
  83. 28 0
      hackathon_starter/hackathon/unittests/testinstagram.py
  84. 37 0
      hackathon_starter/hackathon/unittests/teststeam.py
  85. 31 0
      hackathon_starter/hackathon/unittests/testtumblr.py
  86. 43 0
      hackathon_starter/hackathon/urls.py
  87. 622 0
      hackathon_starter/hackathon/views.py
  88. 0 0
      hackathon_starter/hackathon_starter/__init__.py
  89. 146 0
      hackathon_starter/hackathon_starter/settings.py
  90. 8 0
      hackathon_starter/hackathon_starter/urls.py
  91. 14 0
      hackathon_starter/hackathon_starter/wsgi.py
  92. 68 0
      hackathon_starter/index.rst
  93. 263 0
      hackathon_starter/make.bat
  94. 10 0
      hackathon_starter/manage.py
  95. 3 0
      ionic/.bowerrc
  96. 6 0
      ionic/.gitignore
  97. 26 0
      ionic/README.md
  98. 7 0
      ionic/bower.json
  99. 49 0
      ionic/config.xml
  100. 0 0
      ionic/gulpfile.js

+ 14 - 0
.hgignore

@@ -0,0 +1,14 @@
+syntax: glob
+
+.DS_Store
+db.sqlite3
+*.pyc
+bower_components/
+migrations/
+Thumbs.db
+*/vendor
+ionic/platforms
+hackathon_starter/_build
+hackathon_starter/_static
+hackathon_starter/_templates
+.coverage

+ 390 - 0
.pylintrc

@@ -0,0 +1,390 @@
+[MASTER]
+
+# Specify a configuration file.
+#rcfile=
+
+# Python code to execute, usually for sys.path manipulation such as
+# pygtk.require().
+#init-hook=
+
+# Profiled execution.
+profile=no
+
+# Add files or directories to the blacklist. They should be base names, not
+# paths.
+ignore=CVS
+
+# Pickle collected data for later comparisons.
+persistent=yes
+
+# List of plugins (as comma separated values of python modules names) to load,
+# usually to register additional checkers.
+load-plugins=
+
+# Deprecated. It was used to include message's id in output. Use --msg-template
+# instead.
+include-ids=no
+
+# Deprecated. It was used to include symbolic ids of messages in output. Use
+# --msg-template instead.
+symbols=no
+
+# Use multiple processes to speed up Pylint.
+jobs=1
+
+# Allow loading of arbitrary C extensions. Extensions are imported into the
+# active Python interpreter and may run arbitrary code.
+unsafe-load-any-extension=no
+
+# A comma-separated list of package or module names from where C extensions may
+# be loaded. Extensions are loading into the active Python interpreter and may
+# run arbitrary code
+extension-pkg-whitelist=
+
+# Allow optimization of some AST trees. This will activate a peephole AST
+# optimizer, which will apply various small optimizations. For instance, it can
+# be used to obtain the result of joining multiple strings with the addition
+# operator. Joining a lot of strings can lead to a maximum recursion error in
+# Pylint and this flag can prevent that. It has one side effect, the resulting
+# AST will be different than the one from reality.
+optimize-ast=no
+
+
+[MESSAGES CONTROL]
+
+# Only show warnings with the listed confidence levels. Leave empty to show
+# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
+confidence=
+
+# Enable the message, report, category or checker with the given id(s). You can
+# either give multiple identifier separated by comma (,) or put this option
+# multiple time. See also the "--disable" option for examples.
+#enable=
+
+# Disable the message, report, category or checker with the given id(s). You
+# can either give multiple identifiers separated by comma (,) or put this
+# option multiple times (only on the command line, not in the configuration
+# file where it should appear only once).You can also use "--disable=all" to
+# disable everything first and then reenable specific checks. For example, if
+# you want to run only the similarities checker, you can use "--disable=all
+# --enable=similarities". If you want to run only the classes checker, but have
+# no Warning level messages displayed, use"--disable=all --enable=classes
+# --disable=W"
+disable=E1608,W1627,E1601,E1603,E1602,E1605,E1604,E1607,E1606,W1621,W1620,W1623,W1622,W1625,W1624,W1609,W1608,W1607,W1606,W1605,W1604,W1603,W1602,W1601,W1639,W1640,I0021,W1638,I0020,W1618,W1619,W1630,W1626,W1637,W1634,W1635,W1610,W1611,W1612,W1613,W1614,W1615,W1616,W1617,W1632,W1633,W0704,W1628,W1629,W1636
+
+
+[REPORTS]
+
+# Set the output format. Available formats are text, parseable, colorized, msvs
+# (visual studio) and html. You can also give a reporter class, eg
+# mypackage.mymodule.MyReporterClass.
+output-format=text
+
+# Put messages in a separate file for each module / package specified on the
+# command line instead of printing them on stdout. Reports (if any) will be
+# written in a file name "pylint_global.[txt|html]".
+files-output=no
+
+# Tells whether to display a full report or only the messages
+reports=yes
+
+# Python expression which should return a note less than 10 (10 is the highest
+# note). You have access to the variables errors warning, statement which
+# respectively contain the number of errors / warnings messages and the total
+# number of statements analyzed. This is used by the global evaluation report
+# (RP0004).
+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
+
+# Add a comment according to your evaluation note. This is used by the global
+# evaluation report (RP0004).
+comment=no
+
+# Template used to display messages. This is a python new-style format string
+# used to format the message information. See doc for all details
+#msg-template=
+
+
+[BASIC]
+
+# Required attributes for module, separated by a comma
+required-attributes=
+
+# List of builtins function names that should not be used, separated by a comma
+bad-functions=map,filter,input
+
+# Good variable names which should always be accepted, separated by a comma
+good-names=i,j,k,ex,Run,_
+
+# Bad variable names which should always be refused, separated by a comma
+bad-names=foo,bar,baz,toto,tutu,tata
+
+# Colon-delimited sets of names that determine each other's naming style when
+# the name regexes allow several styles.
+name-group=
+
+# Include a hint for the correct naming format with invalid-name
+include-naming-hint=no
+
+# Regular expression matching correct function names
+function-rgx=[a-z][A-Za-z0-9]{1,30}$
+
+# Naming hint for function names
+function-name-hint=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression matching correct variable names
+variable-rgx=[a-z][A-Za-z0-9]{1,30}$
+
+# Naming hint for variable names
+variable-name-hint=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression matching correct constant names
+const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
+
+# Naming hint for constant names
+const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
+
+# Regular expression matching correct attribute names
+attr-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Naming hint for attribute names
+attr-name-hint=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression matching correct argument names
+argument-rgx=[a-z][A-Za-z0-9]{1,30}$
+
+# Naming hint for argument names
+argument-name-hint=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression matching correct class attribute names
+class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
+
+# Naming hint for class attribute names
+class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
+
+# Regular expression matching correct inline iteration names
+inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
+
+# Naming hint for inline iteration names
+inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
+
+# Regular expression matching correct class names
+class-rgx=[A-Z_][a-zA-Z0-9]+$
+
+# Naming hint for class names
+class-name-hint=[A-Z_][a-zA-Z0-9]+$
+
+# Regular expression matching correct module names
+module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
+
+# Naming hint for module names
+module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
+
+# Regular expression matching correct method names
+method-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Naming hint for method names
+method-name-hint=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match function or class names that do
+# not require a docstring.
+no-docstring-rgx=__.*__
+
+# Minimum line length for functions/classes that require docstrings, shorter
+# ones are exempt.
+docstring-min-length=-1
+
+
+[FORMAT]
+
+# Maximum number of characters on a single line.
+max-line-length=100
+
+# Regexp for a line that is allowed to be longer than the limit.
+ignore-long-lines=^\s*(# )?<?https?://\S+>?$
+
+# Allow the body of an if to be on the same line as the test if there is no
+# else.
+single-line-if-stmt=no
+
+# List of optional constructs for which whitespace checking is disabled
+no-space-check=trailing-comma,dict-separator
+
+# Maximum number of lines in a module
+max-module-lines=1000
+
+# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
+# tab).
+indent-string='    '
+
+# Number of spaces of indent required inside a hanging or continued line.
+indent-after-paren=4
+
+# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
+expected-line-ending-format=
+
+
+[LOGGING]
+
+# Logging modules to check that the string format arguments are in logging
+# function parameter format
+logging-modules=logging
+
+
+[MISCELLANEOUS]
+
+# List of note tags to take in consideration, separated by a comma.
+notes=FIXME,XXX,TODO
+
+
+[SIMILARITIES]
+
+# Minimum lines number of a similarity.
+min-similarity-lines=4
+
+# Ignore comments when computing similarities.
+ignore-comments=yes
+
+# Ignore docstrings when computing similarities.
+ignore-docstrings=yes
+
+# Ignore imports when computing similarities.
+ignore-imports=no
+
+
+[SPELLING]
+
+# Spelling dictionary name. Available dictionaries: none. To make it working
+# install python-enchant package.
+spelling-dict=
+
+# List of comma separated words that should not be checked.
+spelling-ignore-words=
+
+# A path to a file that contains private dictionary; one word per line.
+spelling-private-dict-file=
+
+# Tells whether to store unknown words to indicated private dictionary in
+# --spelling-private-dict-file option instead of raising a message.
+spelling-store-unknown-words=no
+
+
+[TYPECHECK]
+
+# Tells whether missing members accessed in mixin class should be ignored. A
+# mixin class is detected if its name ends with "mixin" (case insensitive).
+ignore-mixin-members=yes
+
+# List of module names for which member attributes should not be checked
+# (useful for modules/projects where namespaces are manipulated during runtime
+# and thus existing member attributes cannot be deduced by static analysis
+ignored-modules=
+
+# List of classes names for which member attributes should not be checked
+# (useful for classes with attributes dynamically set).
+ignored-classes=SQLObject
+
+# When zope mode is activated, add a predefined set of Zope acquired attributes
+# to generated-members.
+zope=no
+
+# List of members which are set dynamically and missed by pylint inference
+# system, and so shouldn't trigger E0201 when accessed. Python regular
+# expressions are accepted.
+generated-members=REQUEST,acl_users,aq_parent
+
+
+[VARIABLES]
+
+# Tells whether we should check for unused import in __init__ files.
+init-import=no
+
+# A regular expression matching the name of dummy variables (i.e. expectedly
+# not used).
+dummy-variables-rgx=_$|dummy
+
+# List of additional names supposed to be defined in builtins. Remember that
+# you should avoid to define new builtins when possible.
+additional-builtins=
+
+# List of strings which can identify a callback function by name. A callback
+# name must start or end with one of those strings.
+callbacks=cb_,_cb
+
+
+[CLASSES]
+
+# List of interface methods to ignore, separated by a comma. This is used for
+# instance to not check methods defines in Zope's Interface base class.
+ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
+
+# List of method names used to declare (i.e. assign) instance attributes.
+defining-attr-methods=__init__,__new__,setUp
+
+# List of valid names for the first argument in a class method.
+valid-classmethod-first-arg=cls
+
+# List of valid names for the first argument in a metaclass class method.
+valid-metaclass-classmethod-first-arg=mcs
+
+# List of member names, which should be excluded from the protected access
+# warning.
+exclude-protected=_asdict,_fields,_replace,_source,_make
+
+
+[DESIGN]
+
+# Maximum number of arguments for function / method
+max-args=5
+
+# Argument names that match this expression will be ignored. Default to name
+# with leading underscore
+ignored-argument-names=_.*
+
+# Maximum number of locals for function / method body
+max-locals=15
+
+# Maximum number of return / yield for function / method body
+max-returns=6
+
+# Maximum number of branch for function / method body
+max-branches=12
+
+# Maximum number of statements in function / method body
+max-statements=50
+
+# Maximum number of parents for a class (see R0901).
+max-parents=7
+
+# Maximum number of attributes for a class (see R0902).
+max-attributes=7
+
+# Minimum number of public methods for a class (see R0903).
+min-public-methods=2
+
+# Maximum number of public methods for a class (see R0904).
+max-public-methods=20
+
+
+[IMPORTS]
+
+# Deprecated modules which should not be used, separated by a comma
+deprecated-modules=regsub,TERMIOS,Bastion,rexec
+
+# Create a graph of every (i.e. internal and external) dependencies in the
+# given file (report RP0402 must not be disabled)
+import-graph=
+
+# Create a graph of external dependencies in the given file (report RP0402 must
+# not be disabled)
+ext-import-graph=
+
+# Create a graph of internal dependencies in the given file (report RP0402 must
+# not be disabled)
+int-import-graph=
+
+
+[EXCEPTIONS]
+
+# Exceptions that will emit a warning when being caught. Defaults to
+# "Exception"
+overgeneral-exceptions=Exception

+ 155 - 0
README.md

@@ -0,0 +1,155 @@
+Django Hackathon Starter
+------------------------
+
+## What is Django Hackathon Starter
+
+> Django Hackathon Starter aims to be a project which will aggegrate data from several APIs, producing a RESTful API which can be consumed by a client (also intended to be built). 
+
+Our deployment can be found [here](http://django-hackathon-starter.herokuapp.com/hackathon/).
+
+## Running this project
+
+In order to run this project, do the following:
+
+    # Install the requirements
+    pip install -r requirements.txt
+
+    # Perform database migrations
+    python manage.py migrate
+
+    # Run the server
+    python manage.py runserver
+
+## Front End dependencies
+
+This project relies on Bower for all front end libraries, to avoid pushing up large libraries such as `jQuery` and `Bootstrap`. **Under no circumstance should any front-end libraries manually be pushed up to the repository.** To install `bower`, you will need to install `npm`, which now comes bundled with `node.js`. To install `npm`, simply install [node as follows](https://github.com/joyent/node/wiki/installing-node.js-via-package-manager). 
+
+First, install `bower`:
+
+    npm install -g bower
+
+Then:
+
+    # In the same directory as requirements.txt
+    bower install
+
+This will download and extract all the packages listed within `bower.json`. 
+
+Then:
+
+    # move bower_components into static folder
+    mv bower_components/ hackathon_starter/hackathon/static
+
+To install the front-end dependencies for the AngularJS client, do the following:
+
+    cd public
+    bower install
+    # Rename bower_components folder to vendor
+    mv bower_components/ vendor/
+
+
+## Testing
+
+This project aims to be as close to 100% tested as possible. For a good guide to testing using Python and `Mock`, `Nosetests` and `Unittests` libraries, please [read here](http://docs.python-guide.org/en/latest/writing/tests/).
+
+To run the tests:
+
+    hackthon-starter $ python manage.py test hackathon/unittests/
+
+## Code evaluation
+
+In order to write clean code with a consistent style guide, we'll be using `Pylint` to maintain our code. Pylint will display a ton of messages regarding things that should be fixed. 
+
+This project will use the camel-case naming convention for variables and function names, which PyLint complains about by default. As such, I have created a pylint configuration file within the home directory of the project (the same directory which contains `ionic`, `angular`, `hackathon_starter`.) To run pylint while supplying a pylint configuration file:
+
+    pylint --rcfile path/to/pylintrcfile/.pylintrc hackathon_starter/hackathon/scripts/github.py
+
+Where you can substitute `github.py` with the script you'd like to evaluate. 
+
+
+## RESTful endpoints
+
+Using the `Django REST framework`, the current RESTful endpoints exist:
+
+    http://127.0.0.1:8000/hackathon/snippets/
+
+The list will appear empty at first, since the database model `Snippets` will be empty. To populate it with some sample data, run the following:
+
+    python manage.py shell
+    from hackathon.models import Snippet
+    from hackathon.serializers import SnippetSerializer
+    from rest_framework.renderers import JSONRenderer
+    from rest_framework.parsers import JSONParser
+
+    snippet = Snippet(code='foo = "bar"\n')
+    snippet.save()
+
+    snippet = Snippet(code='print "hello, world"\n')
+    snippet.save()
+
+The above will open the Django shell, and allow you to create objects and save them to the database. If you then navigate to the URL above, you will see the JSON output of the database model, `Snippet`. 
+
+## Django JSON Response Endpoints
+
+As of `Django 1.7x`, there is a new method called `JsonResponse` which allows the user to send JSON data to a URL which makes it available to be consumed by any client. The following endpoints exist:
+
+* `http://127.0.0.1:8000/hackathon/steamDiscountedGames/`: JSON output containing steam discounts data
+* `http://127.0.0.1:8000/hackathon/instagramUser/`: JSON output containing data from an Instagram user through OAuth
+* `http://127.0.0.1:8000/hackathon/githubUser/`: JSON output containing data from a Github User
+
+## AngularJS Client
+
+As of `April 11th, 2015`, there is now a sample AngularJS client which pulls data from the Django sample API endpoint: `http://127.0.0.1:8000/hackathon/snippets/`. To test it, do the following:
+
+* Within the `angular/` directory, run `python -m SimpleHTTPServer 80`. You may need `sudo` on your respective Operating System.
+* Navigate to: `http://localhost/#/snippets`. Here you will see whatever content was stored within the database model, `Snippet`. If nothing shows up, go back to the `RESTful endpoints` step to populate your database with some `Snippet` objects. 
+
+The following other links are available on the AngularJS Client:
+
+* `http://localhost/#/githubUser`: Pulls JSON response for Github data from Django 
+* `http://localhost/#/steamSales`: Pulls JSON response for Steam sales data from Django
+
+## Ionic Client
+
+As of `April 11th, 2015`, there is now a sample Ionic application which works on iOS. This application pulls data from the Django sample API endpoint: `http://127.0.0.1:8000/hackathon/snippets/`. In order to successfully run this project, you must do the following:
+
+    # Make sure django-hackathon-starter is running
+    python manage.py runserver
+
+    # Install cordova and ionic
+    # On a Mac, you'll need to use sudo
+    npm install -g cordova ionic 
+
+    cd ionic
+
+    # Add support for the iOS platform
+    ionic platform add ios
+
+    # Build the project
+    ionic build ios
+
+Running the final command, `ionic build ios` will generate an `.xcodeproj` file within `platforms/ionic`. You can open it and then run it, which you should then see a list of all the `Snippet` objects from the Django Hackathon Starter database. 
+
+You can also test the project in the browser by doing the following:
+
+    cd ionic
+    ionic serve 
+
+Running `ionic serve` will automatically open up your web browser and run the application.
+
+
+## Building the documentation
+
+In order to build the documentation for this project:
+
+    $ cd hackathon_starter
+    $ make html
+
+The output is stored within `_build/html`. Open up `index.html` to view the documentation.
+
+## Contributors
+
+* David Leonard
+* Eswari Swarna
+* Marco Quezada 
+* Wan Kim Mok

+ 35 - 0
angular/addons/footer.html

@@ -0,0 +1,35 @@
+<!-- Main jumbotron for a primary marketing message or call to action -->
+<div class="jumbotron">
+  <div class="container">
+    <h1>Hello, world!</h1>
+    <p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
+    <p><a class="btn btn-primary btn-lg">Learn more &raquo;</a></p>
+  </div>
+</div>
+
+<div class="container">
+  <!-- Example row of columns -->
+  <div class="row">
+    <div class="col-lg-4">
+      <h2>Heading</h2>
+      <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+      <p><a class="btn btn-default" href="#">View details &raquo;</a></p>
+    </div>
+    <div class="col-lg-4">
+      <h2>Heading</h2>
+      <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
+      <p><a class="btn btn-default" href="#">View details &raquo;</a></p>
+   </div>
+    <div class="col-lg-4">
+      <h2>Heading</h2>
+      <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
+      <p><a class="btn btn-default" href="#">View details &raquo;</a></p>
+    </div>
+  </div>
+
+  <hr>
+
+  <footer>
+    <p>&copy; Company 2013</p>
+  </footer>
+</div> <!-- /container -->

+ 19 - 0
angular/addons/nav.html

@@ -0,0 +1,19 @@
+<nav>
+    <ul class="list-unstyled main-menu">
+      <li><a href="#/snippets">Snippets <span class="icon"></span></a></li>
+      <li><a href="#/steamSales">Steam Sales <span class="icon"></span></a></li>
+      <li><a href="#/githubUser">Github User <span class="icon"></span></a></li>
+      <li><a href="#/githubTopContributions">Github Resume <span class="icon"></span></a></li>
+      <li><a href="#/instagramUser">Instagram User <span class="icon"></span></a></li>
+      <li><a href="#">Dropdown</a>
+        <ul class="list-unstyled">
+            <li class="sub-nav"><a href="#">Sub Menu One <span class="icon"></span></a></li>
+            <li class="sub-nav"><a href="#">Sub Menu Two <span class="icon"></span></a></li>
+            <li class="sub-nav"><a href="#">Sub Menu Three <span class="icon"></span></a></li>
+            <li class="sub-nav"><a href="#">Sub Menu Four <span class="icon"></span></a></li>
+            <li class="sub-nav"><a href="#">Sub Menu Five <span class="icon"></span></a></li>
+        </ul>
+      </li>
+    </ul>
+</nav>
+

+ 22 - 0
angular/bower.json

@@ -0,0 +1,22 @@
+{
+  "name": "django-hackathon-starter",
+  "version": "0.0.0",
+  "authors": [
+    "David Leonard <sephirothcloud1025@yahoo.com>"
+  ],
+  "description": "Django boilerplate project for hackathons",
+  "keywords": [
+    "Django",
+    "Python",
+    "API",
+    "RESTful"
+  ],
+  "license": "MIT",
+  "dependencies": {
+    "bootstrap": "~3.3.4",
+    "jquery": "~2.1.3",
+    "bootstrap-social": "~4",
+    "angular": "~1.3.15",
+    "angular-ui-router": "~0.2.13"
+  }
+}

+ 176 - 0
angular/css/main.css

@@ -0,0 +1,176 @@
+
+
+/* ==========================================================================
+   Author's custom styles
+   ========================================================================== */
+
+a.nav-expander {
+  background: none repeat scroll 0 0 #000000;
+  color: #FFFFFF;
+  display: block;
+  font-size: 15px;
+  font-weight: 400;
+  height: 50px;
+  margin-right: 0;
+  padding: 1em 1.6em 2em;
+  position: absolute;
+  right: 0;
+  text-decoration: none;
+  text-transform: uppercase;
+  top: 0;
+  transition: right 0.3s ease-in-out 0s;
+  width: 130px;
+  z-index: 12;
+
+  transition: right 0.3s ease-in-out 0s;
+  -webkit-transition: right 0.3s ease-in-out 0s;
+  -moz-transition: right 0.3s ease-in-out 0s;
+  -o-transition: right 0.3s ease-in-out 0s;
+
+}
+
+a.nav-expander:hover {
+  cursor: pointer;
+}
+
+a.nav-expander.fixed {
+  position: fixed;
+}
+
+.nav-expanded a.nav-expander.fixed {
+    right: 20em;
+}
+
+nav {
+  background: #2d2f33;
+  display: block;
+  height: 100%;
+  overflow: auto;
+  position: fixed;
+  right: -20em;
+  font-size: 15px;
+  top: 0;
+  width: 20em;
+  z-index: 2000;
+  
+  transition: right 0.3s ease-in-out 0s;
+  -webkit-transition: right 0.3s ease-in-out 0s;
+  -moz-transition: right 0.3s ease-in-out 0s;
+  -o-transition: right 0.3s ease-in-out 0s;
+
+}
+.nav-expanded nav {
+  right: 0;
+}
+
+body.nav-expanded {
+  margin-left: 0em;
+  transition: right 0.4s ease-in-out 0s;
+  -webkit-transition: right 0.4s ease-in-out 0s;
+  -moz-transition: right 0.4s ease-in-out 0s;
+  -o-transition: right 0.4s ease-in-out 0s;
+}
+
+#nav-close {
+  font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
+  font-weight: 300;
+  font-size: 24px;
+  padding-right: 10px;
+}
+
+.main-menu {
+  padding-top: 12px;
+}
+
+.main-menu li {
+  border-bottom: 1px solid #323949;
+  margin-left: 20px;
+  font-size: 18px;
+  padding: 12px;
+}
+
+.main-menu li a {
+  color: #6F7D8C;
+  text-decoration: none;
+}
+
+.main-menu li a:hover {
+  color: #FFFFFF;
+  text-decoration: none;
+}
+
+.main-menu li .sub-nav {
+  border-bottom: 0px;
+  padding: 4px;
+}
+
+.main-menu a .caret {
+	width: 0;
+	height: 0;
+	display: inline-block;
+	vertical-align: top;
+	border-top: 4px solid #4f5963;
+	border-right: 4px solid transparent;
+	border-left: 4px solid transparent;
+	content: "";
+    margin-top: 8px;
+}
+
+.main-menu a:hover .caret {
+	border-top-color: #4f5963;
+}
+
+.main-menu li.open > a > .caret {
+	border-top: none;
+	border-bottom: 4px solid #4f5963;
+	border-right: 4px solid transparent;
+	border-left: 4px solid transparent;
+}
+
+.main-menu li.open > a:hover > .caret {
+	border-bottom-color: #4f5963;
+}
+
+.icon:before {
+  font-family: 'FontAwesome';
+  font-style: normal;
+  font-variant: normal;
+  font-weight: normal;
+  line-height: 1;
+  text-transform: none;
+  content: '\f105';
+}
+
+.main-menu li > a > span.icon {
+  float: right;
+  margin: 0.1em 1.7em -0.1em 0;
+  opacity: 0;
+  -webkit-transition: all 0.2s ease-in-out;
+  -moz-transition: all 0.2s ease-in-out;
+  -o-transition: all 0.2s ease-in-out;
+  transition: all 0.2s ease-in-out;
+
+}
+
+.main-menu li > a:hover > span.icon {
+  float: right;
+  margin: 0.1em 0.8em -0.1em 0;
+  opacity: 1;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 99 - 0
angular/index.html

@@ -0,0 +1,99 @@
+<!DOCTYPE html>
+<html lang="en-us" data-ng-app="restApp" data-ng-controller="appController">
+    <head>
+        <meta charset="utf-8">
+
+        <title data-ng-bind="pageTitle + ' | RestAPP'">RestAPP</title>
+
+        <!-- AngularJS -->
+        <script src="vendor/angular/angular.js"></script>
+        <script src="vendor/angular-ui-router/release/angular-ui-router.min.js"></script>
+
+        <!-- Bootstrap Core CSS -->
+        <link href="vendor/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
+
+        <!-- Styles -->
+        <link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css">
+        <link rel="stylesheet" href="css/main.css">
+
+        <!-- jQuery -->
+        <script src="vendor/jquery/dist/jquery.min.js"></script>
+
+        <!-- Bootstrap Core JavaScript -->
+        <script src="vendor/bootstrap/dist/js/bootstrap.min.js"></script>
+
+        <!-- Front-end JavaScript -->
+        <script src="js/jquery.navgoco.js"></script>
+        <script>
+        $(document).ready(function(){                       
+           
+           //Navigation Menu Slider
+            $('#nav-expander').on('click',function(e){
+              e.preventDefault();
+              $('body').toggleClass('nav-expanded');
+            });
+            $('#nav-close').on('click',function(e){
+              e.preventDefault();
+              $('body').removeClass('nav-expanded');
+            });
+            
+            
+            // Initialize navgoco with default options
+            $(".main-menu").navgoco({
+                caret: '<span class="caret"></span>',
+                accordion: false,
+                openClass: 'open',
+                save: true,
+                cookie: {
+                    name: 'navgoco',
+                    expires: false,
+                    path: '/'
+                },
+                slide: {
+                    duration: 300,
+                    easing: 'swing'
+                }
+            });
+      
+              
+          });
+          </script>
+
+        <!-- Main application file -->
+        <script src="scripts/app.js"></script>
+
+        <!-- Controllers --> 
+        <script src="scripts/controllers/appController.js"></script>
+        <script src="scripts/controllers/restAppController.js"></script>
+        <script src="scripts/controllers/githubUserController.js"></script>
+        <script src="scripts/controllers/githubTopContributionsController.js"></script>
+        <script src="scripts/controllers/steamSalesController.js"></script>
+        <script src="scripts/controllers/instagramUserController.js"></script>
+
+        <!-- Factories -->
+        <script src="scripts/factories/restAppFactory.js"></script>
+        <script src="scripts/factories/githubUserFactory.js"></script>
+        <script src="scripts/factories/githubTopContributionsFactory.js"></script>
+        <script src="scripts/factories/steamSalesFactory.js"></script>
+        <script src="scripts/factories/instagramUserFactory.js"></script>
+        <script src="scripts/factories/instagramUserMediaFactory.js"></script>
+
+    </head>
+
+    <body>
+        <div data-ui-view></div>
+
+        <div ng-include="'addons/nav.html'"></div>
+        
+        <div class="navbar navbar-inverse navbar-fixed-top">      
+            <!--Include your brand here-->
+            <a class="navbar-brand" href="#">Django-AngularJS</a>
+            <div class="navbar-header pull-right">
+              <a id="nav-expander" class="nav-expander fixed">
+                Apps &nbsp;<i class="fa fa-bars fa-lg white"></i>
+              </a>
+            </div>
+        </div>
+        
+    </body>
+</html>

+ 301 - 0
angular/js/jquery.navgoco.js

@@ -0,0 +1,301 @@
+/*
+ * jQuery Navgoco Menus Plugin v0.1.5 (2013-09-07)
+ * https://github.com/tefra/navgoco
+ *
+ * Copyright (c) 2013 Chris T (@tefra)
+ * BSD - https://github.com/tefra/navgoco/blob/master/LICENSE-BSD
+ */
+(function($) {
+
+	"use strict";
+
+	/**
+	 * Plugin Constructor. Every menu must have a unique id which will either
+	 * be the actual id attribute or its index in the page.
+	 *
+	 * @param {Element} el
+	 * @param {Object} options
+	 * @param {Integer} idx
+	 * @returns {Object} Plugin Instance
+	 */
+	var Plugin = function(el, options, idx) {
+		this.el = el;
+		this.$el = $(el);
+		this.options = options;
+		this.uuid = this.$el.attr('id') ? this.$el.attr('id') : idx;
+		this.state = {};
+		this.init();
+		return this;
+	};
+
+	/**
+	 * Plugin methods
+	 */
+	Plugin.prototype = {
+		/**
+		 * Load cookie, assign a unique data-index attribute to
+		 * all sub-menus and show|hide them according to cookie
+		 * or based on the parent open class. Find all parent li > a
+		 * links add the carent if it's on and attach the event click
+		 * to them.
+		 */
+		init: function() {
+			var self = this;
+			self._load();
+			self.$el.find('ul').each(function(idx) {
+				var sub = $(this);
+				sub.attr('data-index', idx);
+				if (self.options.save && self.state.hasOwnProperty(idx)) {
+					sub.parent().addClass(self.options.openClass);
+					sub.show();
+				} else if (sub.parent().hasClass(self.options.openClass)) {
+					sub.show();
+					self.state[idx] = 1;
+				} else {
+					sub.hide();
+				}
+			});
+
+			if (self.options.caret) {
+				self.$el.find("li:has(ul) > a").append(self.options.caret);
+			}
+
+			var links = self.$el.find("li > a");
+			links.on('click', function(event) {
+				event.stopPropagation();
+				var sub = $(this).next();
+				sub = sub.length > 0 ? sub : false;
+				self.options.onClickBefore.call(this, event, sub);
+				if (sub) {
+					event.preventDefault();
+					self._toggle(sub, sub.is(":hidden"));
+					self._save();
+				} else {
+					if (self.options.accordion) {
+						var allowed = self.state = self._parents($(this));
+						self.$el.find('ul').filter(':visible').each(function() {
+							var sub = $(this),
+								idx = sub.attr('data-index');
+
+							if (!allowed.hasOwnProperty(idx)) {
+								self._toggle(sub, false);
+							}
+						});
+						self._save();
+					}
+				}
+				self.options.onClickAfter.call(this, event, sub);
+			});
+		},
+		/**
+		 * Accepts a JQuery Element and a boolean flag. If flag is false it removes the `open` css
+		 * class from the parent li and slides up the sub-menu. If flag is open it adds the `open`
+		 * css class to the parent li and slides down the menu. If accordion mode is on all
+		 * sub-menus except the direct parent tree will close. Internally an object with the menus
+		 * states is maintained for later save duty.
+		 *
+		 * @param {Element} sub
+		 * @param {Boolean} open
+		 */
+		_toggle: function(sub, open) {
+			var self = this,
+				idx = sub.attr('data-index'),
+				parent = sub.parent();
+
+			self.options.onToggleBefore.call(this, sub, open);
+			if (open) {
+				parent.addClass(self.options.openClass);
+				sub.slideDown(self.options.slide);
+				self.state[idx] = 1;
+
+				if (self.options.accordion) {
+					var allowed = self.state = self._parents(sub);
+					allowed[idx] = self.state[idx] = 1;
+
+					self.$el.find('ul').filter(':visible').each(function() {
+						var sub = $(this),
+							idx = sub.attr('data-index');
+
+						if (!allowed.hasOwnProperty(idx)) {
+							self._toggle(sub, false);
+						}
+					});
+				}
+			} else {
+				parent.removeClass(self.options.openClass);
+				sub.slideUp(self.options.slide);
+				self.state[idx] = 0;
+			}
+			self.options.onToggleAfter.call(this, sub, open);
+		},
+		/**
+		 * Returns all parents of a sub-menu. When obj is true It returns an object with indexes for
+		 * keys and the elements as values, if obj is false the object is filled with the value `1`.
+		 *
+		 * @since v0.1.2
+		 * @param {Element} sub
+		 * @param {Boolean} obj
+		 * @returns {Object}
+		 */
+		_parents: function(sub, obj) {
+			var result = {},
+				parent = sub.parent(),
+				parents = parent.parents('ul');
+
+			parents.each(function() {
+				var par = $(this),
+					idx = par.attr('data-index');
+
+				if (!idx) {
+					return false;
+				}
+				result[idx] = obj ? par : 1;
+			});
+			return result;
+		},
+		/**
+		 * If `save` option is on the internal object that keeps track of the sub-menus states is
+		 * saved with a cookie. For size reasons only the open sub-menus indexes are stored.		 *
+		 */
+		_save: function() {
+			if (this.options.save) {
+				var save = {};
+				for (var key in this.state) {
+					if (this.state[key] === 1) {
+						save[key] = 1;
+					}
+				}
+				cookie[this.uuid] = this.state = save;
+				$.cookie(this.options.cookie.name, JSON.stringify(cookie), this.options.cookie);
+			}
+		},
+		/**
+		 * If `save` option is on it reads the cookie data. The cookie contains data for all
+		 * navgoco menus so the read happens only once and stored in the global `cookie` var.
+		 */
+		_load: function() {
+			if (this.options.save) {
+				if (cookie === null) {
+					var data = $.cookie(this.options.cookie.name);
+					cookie = (data) ? JSON.parse(data) : {};
+				}
+				this.state = cookie.hasOwnProperty(this.uuid) ? cookie[this.uuid] : {};
+			}
+		},
+		/**
+		 * Public method toggle to manually show|hide sub-menus. If no indexes are provided all
+		 * items will be toggled. You can pass sub-menus indexes as regular params. eg:
+		 * navgoco('toggle', true, 1, 2, 3, 4, 5);
+		 *
+		 * Since v0.1.2 it will also open parents when providing sub-menu indexes.
+		 *
+		 * @param {Boolean} open
+		 */
+		toggle: function(open) {
+			var self = this,
+				length = arguments.length;
+
+			if (length <= 1) {
+				self.$el.find('ul').each(function() {
+					var sub = $(this);
+					self._toggle(sub, open);
+				});
+			} else {
+				var idx,
+					list = {},
+					args = Array.prototype.slice.call(arguments, 1);
+				length--;
+
+				for (var i = 0; i < length; i++) {
+					idx = args[i];
+					var sub = self.$el.find('ul[data-index="' + idx + '"]').first();
+					if (sub) {
+						list[idx] = sub;
+						if (open) {
+							var parents = self._parents(sub, true);
+							for (var pIdx in parents) {
+								if (!list.hasOwnProperty(pIdx)) {
+									list[pIdx] = parents[pIdx];
+								}
+							}
+						}
+					}
+				}
+
+				for (idx in list) {
+					self._toggle(list[idx], open);
+				}
+			}
+			self._save();
+		},
+		/**
+		 * Removes instance from JQuery data cache and unbinds events.
+		 */
+		destroy: function() {
+			$.removeData(this.$el);
+			this.$el.find("li:has(ul) > a").unbind('click');
+		}
+	};
+
+	/**
+	 * A JQuery plugin wrapper for navgoco. It prevents from multiple instances and also handles
+	 * public methods calls. If we attempt to call a public method on an element that doesn't have
+	 * a navgoco instance, one will be created for it with the default options.
+	 *
+	 * @param {Object|String} options
+	 */
+	$.fn.navgoco = function(options) {
+		if (typeof options === 'string' && options.charAt(0) !== '_' && options !== 'init') {
+			var callback = true,
+				args = Array.prototype.slice.call(arguments, 1);
+		} else {
+			options = $.extend({}, $.fn.navgoco.defaults, options || {});
+			if (!$.cookie) {
+				options.save = false;
+			}
+		}
+		return this.each(function(idx) {
+			var $this = $(this),
+				obj = $this.data('navgoco');
+
+			if (!obj) {
+				obj = new Plugin(this, callback ? $.fn.navgoco.defaults : options, idx);
+				$this.data('navgoco', obj);
+			}
+			if (callback) {
+				obj[options].apply(obj, args);
+			}
+		});
+	};
+	/**
+	 * Global var holding all navgoco menus open states
+	 *
+	 * @type {Object}
+	 */
+	var cookie = null;
+
+	/**
+	 * Default navgoco options
+	 *
+	 * @type {Object}
+	 */
+	$.fn.navgoco.defaults = {
+		caret: '<span class="caret"></span>',
+		accordion: false,
+		openClass: 'open',
+		save: true,
+		cookie: {
+			name: 'navgoco',
+			expires: false,
+			path: '/'
+		},
+		slide: {
+			duration: 400,
+			easing: 'swing'
+		},
+		onClickBefore: $.noop,
+		onClickAfter: $.noop,
+		onToggleBefore: $.noop,
+		onToggleAfter: $.noop
+	};
+})(jQuery);

+ 29 - 0
angular/partials/githubTopContributions.partial.html

@@ -0,0 +1,29 @@
+<div class="jumbotron">
+  <div class="container">
+
+    <div class="row text-center">
+    	<h1> Github Top Contributed Repositories</h1>
+    </div>
+
+    <div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                    <tr>
+                        <th class="header">Repository Name</th>
+                        <th class="header">Total Commits</th>
+                        <th class="header">Author</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr data-ng-repeat="data in githubTopContributions.data.committed">
+                            <td>{{ data.repo_name }}</td>
+                            <td>{{ data.total }}</td>
+                            <td>{{ data.author }}</td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+  </div>
+</div>

+ 40 - 0
angular/partials/githubUser.partial.html

@@ -0,0 +1,40 @@
+<div class="jumbotron">
+  <div class="container">
+
+    <div class="row text-center"> 
+        <h1> Github User Data </h1>
+    </div>
+
+    <div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                    <tr>
+                        <th class="header">Public Repos</th>
+                        <th class="header">Public Gists</th>
+                        <th class="header">Name</th>
+                        <th class="header">Blog</th>
+                        <th class="header">Followers</th>
+                        <th class="header">Following</th>
+                        <th class="header">E-mail</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr data-ng-repeat="data in githubUser.data.userData">
+                            <td>{{ data.public_repos }}</td>
+                            <td>{{ data.public_gists }}</td>
+                            <td>{{ data.name }}</td>
+                            <td>{{ data.blog }}</td>
+                            <td>{{ data.followers }}</td>
+                            <td>{{ data.following }}</td>
+                            <td>{{ data.email }}</td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+  </div>
+</div>
+
+
+

+ 43 - 0
angular/partials/instagramUser.partial.html

@@ -0,0 +1,43 @@
+<div class="jumbotron">
+  <div class="container">
+
+    <div class="row text-center"> 
+        <h1> Instagram User Data </h1>
+    </div>
+
+	    <div class="col-lg-12">
+	        <div class="table-responsive">
+	            <table class="table table-bordered table-hover table-striped tablesorter">
+	                <thead> 
+	                	<tr>
+	                		<th>Username</th>
+	                		<th>ID</th>
+	                		<th>Bio</th>
+	                		<th>Website</th>
+	                		<th>Profile Image</th>
+	                		<th>Full Name</th>
+	                		<th>Following</th>
+	                		<th>Followers</th>
+	                		<th>Total Media</th>
+	                	</tr>
+	                </thead>
+	                <tbody>
+	                	<tr data-ng-repeat="data in instagramUserData">
+	                		<td>{{data.username}}</td>
+	                		<td>{{data.id}}</td>
+	                		<td>{{data.bio}}</td>
+	                		<td>{{data.website}}</td>
+	                		<td><img src="{{data.profile_picture}}"></td>
+	                		<td>{{data.full_name}}</td>
+	                		<td>{{data.counts.follows}}</td>
+	                		<td>{{data.counts.followed_by}}</td>
+	                		<td>{{data.counts.media}}</td>
+	                	</tr>
+	                </tbody>
+	            </table>
+
+	        	<img data-ng-repeat= "i in instagramUserMediaData.data" src="{{i.images.thumbnail.url}}">
+	        </div>
+	    </div>	    
+	</div>
+</div>

+ 29 - 0
angular/partials/snippets.partial.html

@@ -0,0 +1,29 @@
+<div class="jumbotron">
+  <div class="container">
+
+    <div class="row text-center">
+    	<h1> Code Snippets </h1>
+    </div>
+
+    <div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                    <tr>
+                        <th class="header">Code</th>
+                        <th class="header">ID</th>
+                        <th class="header">Line Numbers</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr data-ng-repeat="data in restData">
+    	                    <td>{{ data.code }}</td>
+    	                    <td>{{ data.id }}</td>
+    	                    <td>{{ data.linenos }}</td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+</div>
+</div>

+ 34 - 0
angular/partials/steamSales.partial.html

@@ -0,0 +1,34 @@
+<!-- Main jumbotron for a primary marketing message or call to action -->
+<div class="jumbotron">
+  <div class="container">
+    <div class="row text-center"> 
+        <h1> Latest Steam Sale Data </h1>
+    </div>
+
+    <div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                    <tr>
+                        <th class="header">Name</th>
+                        <th class="header">Release Date</th>
+                        <th class="header">Discount</th>
+                        <th class="header">Price</th>
+                    </tr>
+                </thead>
+                <tbody>
+                    <tr data-ng-repeat="data in steamSales.data ">
+                            <td>{{ data.name }}</td>
+                            <td>{{ data.releaseDates }}</td>
+                            <td>{{ data.discount }} </td>
+                            <td>{{ data.price }}</td>
+                    </tr>
+                </tbody>
+            </table>
+        </div>
+    </div>
+</div>
+</div>
+
+
+

+ 54 - 0
angular/scripts/app.js

@@ -0,0 +1,54 @@
+'use strict';
+
+var restApp = angular.module('restApp', [
+    'ui.router'
+])
+.config(function($stateProvider, $urlRouterProvider) {
+    $stateProvider
+
+        .state('snippets', {
+            url: '/snippets',
+            templateUrl: 'partials/snippets.partial.html',
+            controller: 'restAppController',
+            data: {
+                pageTitle: 'Sample API Data'
+            }
+        })
+
+        .state('githubUser', {
+            url: '/githubUser',
+            templateUrl: 'partials/githubUser.partial.html',
+            controller: 'githubUserController',
+            data: {
+                pageTitle: 'Github User Data'
+            }
+        })
+
+        .state('steamSales', {
+            url: '/steamSales',
+            templateUrl: 'partials/steamSales.partial.html',
+            controller: 'steamSalesController',
+            data: {
+                pageTitle: 'Latest Steam Sales'
+            }
+        })
+
+        .state('githubTopContributions', {
+            url: '/githubTopContributions',
+            templateUrl: 'partials/githubTopContributions.partial.html',
+            controller: 'githubTopContributionsController',
+            data: {
+                pageTitle: 'Top Contributions on Github'
+            }
+        })
+
+        .state('instagramUser',{
+            url:'/instagramUser',
+            templateUrl: 'partials/instagramUser.partial.html',
+            controller: 'instagramUserController',
+            data : {
+                pageTitle: 'Instagram User Data'
+            }
+        });   
+
+});

+ 13 - 0
angular/scripts/controllers/appController.js

@@ -0,0 +1,13 @@
+'use strict';
+
+restApp.controller('appController', function($scope, $location) {
+    $scope.siteTitle = 'REST App';
+
+    $scope.$on('$stateChangeSuccess', function(event, toState) {
+        $scope.pageTitle = toState.data.pageTitle;
+    });
+
+    $scope.isActive = function(viewLocation) {
+        return viewLocation === $location.path();
+    };
+});

+ 10 - 0
angular/scripts/controllers/githubTopContributionsController.js

@@ -0,0 +1,10 @@
+'use strict';
+
+restApp.controller('githubTopContributionsController', function($scope, githubTopContributionsFactory) {
+    $scope.githubTopContributions = {};
+    
+    $scope.githubTopContributions = githubTopContributionsFactory.get().success(function(data) {
+    	$scope.githubTopContributions = data;
+    	console.log(data);
+    });
+});

+ 10 - 0
angular/scripts/controllers/githubUserController.js

@@ -0,0 +1,10 @@
+'use strict';
+
+restApp.controller('githubUserController', function($scope, githubUserFactory) {
+    $scope.githubUser = {};
+    
+    $scope.githubUser = githubUserFactory.get().success(function(data) {
+    	$scope.githubUser = data;
+    	console.log(data);
+    });
+});

+ 19 - 0
angular/scripts/controllers/instagramUserController.js

@@ -0,0 +1,19 @@
+'use strict';
+
+restApp.controller('instagramUserController', function($scope, instagramUserFactory, instagramUserMediaFactory){
+	$scope.instagramUserData = {};
+	$scope.instagramUserMediaData = {};
+
+	$scope.instagramUserData = instagramUserFactory.get().success(function(data){
+		$scope.instagramUserData = data;
+
+		console.log(data);
+	});
+	
+	$scope.instagramUserMediaData = instagramUserMediaFactory.get().success(function(data){
+		$scope.instagramUserMediaData = data;
+
+		console.log(data);
+	});
+
+})

+ 10 - 0
angular/scripts/controllers/restAppController.js

@@ -0,0 +1,10 @@
+'use strict';
+
+restApp.controller('restAppController', function($scope, restAppFactory) {
+    $scope.restData = {};
+    
+    $scope.restData = restAppFactory.get().success(function(data) {
+    	$scope.restData = data;
+    	console.log(data);
+    });
+});

+ 10 - 0
angular/scripts/controllers/steamSalesController.js

@@ -0,0 +1,10 @@
+'use strict';
+
+restApp.controller('steamSalesController', function($scope, steamSalesFactory) {
+    $scope.steamSales= {};
+    
+    $scope.steamSales = steamSalesFactory.get().success(function(data) {
+    	$scope.steamSales = data;
+    	console.log(data);
+    });
+});

+ 12 - 0
angular/scripts/factories/githubTopContributionsFactory.js

@@ -0,0 +1,12 @@
+'use strict';
+
+restApp.factory('githubTopContributionsFactory', function($http) {
+    return {
+        get: function() {
+            return $http({
+                url: 'http://127.0.0.1:8000/hackathon/githubTopRepositories/',
+                method: 'GET',
+            });
+        }
+    };
+});

+ 12 - 0
angular/scripts/factories/githubUserFactory.js

@@ -0,0 +1,12 @@
+'use strict';
+
+restApp.factory('githubUserFactory', function($http) {
+    return {
+        get: function() {
+            return $http({
+                url: 'http://127.0.0.1:8000/hackathon/githubUser/',
+                method: 'GET',
+            });
+        }
+    };
+});

+ 12 - 0
angular/scripts/factories/instagramUserFactory.js

@@ -0,0 +1,12 @@
+'use strict';
+
+restApp.factory('instagramUserFactory', function($http){
+	return {
+		get: function(){
+			return $http({
+				url: 'http://localhost:8000/hackathon/instagramUser/',
+				method: 'GET',
+			});
+		}
+	};
+});

+ 12 - 0
angular/scripts/factories/instagramUserMediaFactory.js

@@ -0,0 +1,12 @@
+'use strict';
+
+restApp.factory('instagramUserMediaFactory', function($http){
+	return {
+		get: function(){
+			return $http({
+				url: 'http://localhost:8000/hackathon/instagramUserMedia/',
+				method: 'GET',
+			});
+		}
+	};
+});

+ 12 - 0
angular/scripts/factories/restAppFactory.js

@@ -0,0 +1,12 @@
+'use strict';
+
+restApp.factory('restAppFactory', function($http) {
+    return {
+        get: function() {
+            return $http({
+                url: 'http://127.0.0.1:8000/hackathon/snippets/',
+                method: 'GET',
+            });
+        }
+    };
+});

+ 12 - 0
angular/scripts/factories/steamSalesFactory.js

@@ -0,0 +1,12 @@
+'use strict';
+
+restApp.factory('steamSalesFactory', function($http) {
+    return {
+        get: function() {
+            return $http({
+                url: 'http://127.0.0.1:8000/hackathon/steamDiscountedGames/',
+                method: 'GET',
+            });
+        }
+    };
+});

+ 21 - 0
bower.json

@@ -0,0 +1,21 @@
+{
+  "name": "django-hackathon-starter",
+  "version": "0.0.0",
+  "authors": [
+    "David Leonard <sephirothcloud1025@yahoo.com>"
+  ],
+  "description": "Django boilerplate project for hackathons",
+  "keywords": [
+    "Django",
+    "Python",
+    "API",
+    "RESTful"
+  ],
+  "license": "MIT",
+  "dependencies": {
+    "bootstrap": "~3.3.4",
+    "jquery": "~2.1.3",
+    "bootstrap-social": "~4",
+    "d3": "~3.5.5"
+  }
+}

+ 32 - 0
gulpfile.js

@@ -0,0 +1,32 @@
+// 1. Include gulp
+var gulp = require('gulp');
+
+// 2. Include any plugins you might need. 
+// NOTE: child_process is NOT a plugin but it is a requirement.
+var process = require('child_process');
+var install = require("gulp-install");
+
+// 3. Write out the tasks. 
+
+gulp.task('bowerinstall',function(){
+	console.info('Installing Bower Packages.')
+    gulp.src(['./bower.json', './package.json'])
+    .pipe(install());
+})
+
+gulp.task('djangomigrate', function(){
+	var spawn = process.spawn;
+	console.info('Doing Django Migrations');
+	var PIPE = {stdio: 'inherit'};
+	spawn('python',['./hackathon_starter/manage.py','migrate'],PIPE);
+});
+
+gulp.task('django', function(){
+	var spawn = process.spawn;
+	console.info('Starting Django server');
+	var PIPE = {stdio: 'inherit'};
+	spawn('python',['./hackathon_starter/manage.py','runserver'],PIPE);
+});
+
+// 4. Default Task
+gulp.task('default',['bowerinstall','django','djangomigrate']);

+ 192 - 0
hackathon_starter/Makefile

@@ -0,0 +1,192 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# User-friendly check for sphinx-build
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
+endif
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  applehelp  to make an Apple Help Book"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  xml        to make Docutils-native XML files"
+	@echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+	@echo "  coverage   to run coverage check of the documentation (if enabled)"
+
+clean:
+	rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/DjangoHackathonStarter.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/DjangoHackathonStarter.qhc"
+
+applehelp:
+	$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
+	@echo
+	@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
+	@echo "N.B. You won't be able to view it unless you put it in" \
+	      "~/Library/Documentation/Help or install it in your application" \
+	      "bundle."
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/DjangoHackathonStarter"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/DjangoHackathonStarter"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+latexpdfja:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through platex and dvipdfmx..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
+
+coverage:
+	$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
+	@echo "Testing of coverage in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/coverage/python.txt."
+
+xml:
+	$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+	@echo
+	@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+pseudoxml:
+	$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+	@echo
+	@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

+ 293 - 0
hackathon_starter/conf.py

@@ -0,0 +1,293 @@
+# -*- coding: utf-8 -*-
+#
+# Django Hackathon Starter documentation build configuration file, created by
+# sphinx-quickstart on Sun Apr 12 22:33:44 2015.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+import shlex
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+sys.path.insert(0, os.path.abspath("hackathon/scripts/"))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+    'sphinx.ext.autodoc',
+    'sphinx.ext.doctest',
+    'sphinx.ext.todo',
+    'sphinx.ext.coverage',
+    'sphinx.ext.mathjax',
+    'sphinx.ext.ifconfig',
+    'sphinx.ext.viewcode',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Django Hackathon Starter'
+copyright = u'2015, David Leonard, Wan Kim Mok, Marco Quezada, Eswari Pravallika Swarna'
+author = u'David Leonard, Wan Kim Mok, Marco Quezada, Eswari Pravallika Swarna'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.0.1'
+# The full version, including alpha/beta/rc tags.
+release = '0.0.1'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = True
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'alabaster'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Language to be used for generating the HTML full-text search index.
+# Sphinx supports the following languages:
+#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
+#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
+#html_search_language = 'en'
+
+# A dictionary with options for the search language support, empty by default.
+# Now only 'ja' uses this config value
+#html_search_options = {'type': 'default'}
+
+# The name of a javascript file (relative to the configuration directory) that
+# implements a search results scorer. If empty, the default will be used.
+#html_search_scorer = 'scorer.js'
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'DjangoHackathonStarterdoc'
+
+# -- Options for LaTeX output ---------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+
+# Latex figure (float) alignment
+#'figure_align': 'htbp',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+latex_documents = [
+  (master_doc, 'DjangoHackathonStarter.tex', u'Django Hackathon Starter Documentation',
+   u'David Leonard, Wan Kim Mok, Marco Quezada, Eswari Pravallika Swarna', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    (master_doc, 'djangohackathonstarter', u'Django Hackathon Starter Documentation',
+     [author], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  (master_doc, 'DjangoHackathonStarter', u'Django Hackathon Starter Documentation',
+   author, 'DjangoHackathonStarter', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False

+ 0 - 0
hackathon_starter/hackathon/__init__.py


+ 15 - 0
hackathon_starter/hackathon/admin.py

@@ -0,0 +1,15 @@
+from django.contrib import admin
+from hackathon.models import UserProfile, Profile, InstagramProfile, TwitterProfile, MeetupToken, GithubProfile, LinkedinProfile
+
+# Register your models here.
+class TwitterProfileAdmin(admin.ModelAdmin):
+	list_display = ('user','twitter_user')
+
+admin.site.register(UserProfile)
+admin.site.register(Profile)
+admin.site.register(InstagramProfile)
+admin.site.register(TwitterProfile, TwitterProfileAdmin)
+admin.site.register(GithubProfile)
+admin.site.register(MeetupToken)
+admin.site.register(LinkedinProfile)
+

+ 11 - 0
hackathon_starter/hackathon/forms.py

@@ -0,0 +1,11 @@
+from django.contrib.auth.forms import UserCreationForm
+from django.contrib.auth.models import User
+from django import forms
+from hackathon.models import UserProfile
+
+class UserForm(forms.ModelForm):
+    password = forms.CharField(widget=forms.PasswordInput())
+
+    class Meta:
+        model = User
+        fields = ('username', 'email', 'password')

+ 0 - 0
hackathon_starter/hackathon/migrations/__init__.py


+ 69 - 0
hackathon_starter/hackathon/models.py

@@ -0,0 +1,69 @@
+from django.db import models
+from django.contrib.auth.models import User
+
+# Create your models here.
+class UserProfile(models.Model):
+    # This line is required. Links UserProfile to a User model instance.
+    user = models.OneToOneField(User)
+
+    # Override the __unicode__() method to return out something meaningful!
+    def __unicode__(self):
+        return self.user.username
+
+class Profile(models.Model):
+    user = models.ForeignKey(User)
+    oauth_token = models.CharField(max_length=200)
+    oauth_secret = models.CharField(max_length=200)
+
+    def __unicode__(self):
+        return unicode(self.user)
+
+class GithubProfile(models.Model):
+    user = models.ForeignKey(User)
+    github_user = models.CharField(max_length=200)
+    access_token = models.CharField(max_length=200)
+    scopes = models.CharField(max_length=200)
+
+    def __unicode__(self):
+        return unicode(self.user)
+
+class InstagramProfile(models.Model):
+    user = models.ForeignKey(User)
+    instagram_user = models.CharField(max_length=200)
+    access_token = models.CharField(max_length=200)
+
+    def __unicode__(self):
+        return unicode(self.user)
+
+class TwitterProfile(models.Model):
+    user = models.ForeignKey(User)
+    twitter_user = models.CharField(max_length=200)
+    oauth_token = models.CharField(max_length=200)
+    oauth_token_secret = models.CharField(max_length=200)
+
+    def __unicode__(self):
+        return unicode(self.user)
+
+class LinkedinProfile(models.Model):
+    user = models.ForeignKey(User)
+    linkedin_user = models.CharField(max_length=200)
+    access_token = models.CharField(max_length=200)
+
+    def __unicode__(self):
+        return unicode(self.user)
+
+class Snippet(models.Model):
+    created = models.DateTimeField(auto_now_add=True)
+    title = models.CharField(max_length=100, blank=True, default='')
+    code = models.TextField()
+    linenos = models.BooleanField(default=False)
+
+    class Meta:
+        ordering = ('created',)
+
+class MeetupToken(models.Model):
+    # user = models.ForeignKey(User)
+    access_token = models.CharField(max_length=200)
+
+    def __unicode__(self):
+        return unicode(self.access_token)

+ 390 - 0
hackathon_starter/hackathon/scripts/.pylintrc

@@ -0,0 +1,390 @@
+[MASTER]
+
+# Specify a configuration file.
+#rcfile=
+
+# Python code to execute, usually for sys.path manipulation such as
+# pygtk.require().
+#init-hook=
+
+# Profiled execution.
+profile=no
+
+# Add files or directories to the blacklist. They should be base names, not
+# paths.
+ignore=CVS
+
+# Pickle collected data for later comparisons.
+persistent=yes
+
+# List of plugins (as comma separated values of python modules names) to load,
+# usually to register additional checkers.
+load-plugins=
+
+# Deprecated. It was used to include message's id in output. Use --msg-template
+# instead.
+include-ids=no
+
+# Deprecated. It was used to include symbolic ids of messages in output. Use
+# --msg-template instead.
+symbols=no
+
+# Use multiple processes to speed up Pylint.
+jobs=1
+
+# Allow loading of arbitrary C extensions. Extensions are imported into the
+# active Python interpreter and may run arbitrary code.
+unsafe-load-any-extension=no
+
+# A comma-separated list of package or module names from where C extensions may
+# be loaded. Extensions are loading into the active Python interpreter and may
+# run arbitrary code
+extension-pkg-whitelist=
+
+# Allow optimization of some AST trees. This will activate a peephole AST
+# optimizer, which will apply various small optimizations. For instance, it can
+# be used to obtain the result of joining multiple strings with the addition
+# operator. Joining a lot of strings can lead to a maximum recursion error in
+# Pylint and this flag can prevent that. It has one side effect, the resulting
+# AST will be different than the one from reality.
+optimize-ast=no
+
+
+[MESSAGES CONTROL]
+
+# Only show warnings with the listed confidence levels. Leave empty to show
+# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
+confidence=
+
+# Enable the message, report, category or checker with the given id(s). You can
+# either give multiple identifier separated by comma (,) or put this option
+# multiple time. See also the "--disable" option for examples.
+#enable=
+
+# Disable the message, report, category or checker with the given id(s). You
+# can either give multiple identifiers separated by comma (,) or put this
+# option multiple times (only on the command line, not in the configuration
+# file where it should appear only once).You can also use "--disable=all" to
+# disable everything first and then reenable specific checks. For example, if
+# you want to run only the similarities checker, you can use "--disable=all
+# --enable=similarities". If you want to run only the classes checker, but have
+# no Warning level messages displayed, use"--disable=all --enable=classes
+# --disable=W"
+disable=E1608,W1627,E1601,E1603,E1602,E1605,E1604,E1607,E1606,W1621,W1620,W1623,W1622,W1625,W1624,W1609,W1608,W1607,W1606,W1605,W1604,W1603,W1602,W1601,W1639,W1640,I0021,W1638,I0020,W1618,W1619,W1630,W1626,W1637,W1634,W1635,W1610,W1611,W1612,W1613,W1614,W1615,W1616,W1617,W1632,W1633,W0704,W1628,W1629,W1636
+
+
+[REPORTS]
+
+# Set the output format. Available formats are text, parseable, colorized, msvs
+# (visual studio) and html. You can also give a reporter class, eg
+# mypackage.mymodule.MyReporterClass.
+output-format=text
+
+# Put messages in a separate file for each module / package specified on the
+# command line instead of printing them on stdout. Reports (if any) will be
+# written in a file name "pylint_global.[txt|html]".
+files-output=no
+
+# Tells whether to display a full report or only the messages
+reports=yes
+
+# Python expression which should return a note less than 10 (10 is the highest
+# note). You have access to the variables errors warning, statement which
+# respectively contain the number of errors / warnings messages and the total
+# number of statements analyzed. This is used by the global evaluation report
+# (RP0004).
+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
+
+# Add a comment according to your evaluation note. This is used by the global
+# evaluation report (RP0004).
+comment=no
+
+# Template used to display messages. This is a python new-style format string
+# used to format the message information. See doc for all details
+#msg-template=
+
+
+[BASIC]
+
+# Required attributes for module, separated by a comma
+required-attributes=
+
+# List of builtins function names that should not be used, separated by a comma
+bad-functions=map,filter,input
+
+# Good variable names which should always be accepted, separated by a comma
+good-names=i,j,k,ex,Run,_
+
+# Bad variable names which should always be refused, separated by a comma
+bad-names=foo,bar,baz,toto,tutu,tata
+
+# Colon-delimited sets of names that determine each other's naming style when
+# the name regexes allow several styles.
+name-group=
+
+# Include a hint for the correct naming format with invalid-name
+include-naming-hint=no
+
+# Regular expression matching correct function names
+function-rgx=[a-z][A-Za-z0-9]{1,30}$
+
+# Naming hint for function names
+function-name-hint=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression matching correct variable names
+variable-rgx=[a-z][A-Za-z0-9]{1,30}$
+
+# Naming hint for variable names
+variable-name-hint=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression matching correct constant names
+const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
+
+# Naming hint for constant names
+const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
+
+# Regular expression matching correct attribute names
+attr-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Naming hint for attribute names
+attr-name-hint=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression matching correct argument names
+argument-rgx=[a-z][A-Za-z0-9]{1,30}$
+
+# Naming hint for argument names
+argument-name-hint=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression matching correct class attribute names
+class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
+
+# Naming hint for class attribute names
+class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
+
+# Regular expression matching correct inline iteration names
+inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
+
+# Naming hint for inline iteration names
+inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
+
+# Regular expression matching correct class names
+class-rgx=[A-Z_][a-zA-Z0-9]+$
+
+# Naming hint for class names
+class-name-hint=[A-Z_][a-zA-Z0-9]+$
+
+# Regular expression matching correct module names
+module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
+
+# Naming hint for module names
+module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
+
+# Regular expression matching correct method names
+method-rgx=[a-z_][a-z0-9_]{2,30}$
+
+# Naming hint for method names
+method-name-hint=[a-z_][a-z0-9_]{2,30}$
+
+# Regular expression which should only match function or class names that do
+# not require a docstring.
+no-docstring-rgx=__.*__
+
+# Minimum line length for functions/classes that require docstrings, shorter
+# ones are exempt.
+docstring-min-length=-1
+
+
+[FORMAT]
+
+# Maximum number of characters on a single line.
+max-line-length=100
+
+# Regexp for a line that is allowed to be longer than the limit.
+ignore-long-lines=^\s*(# )?<?https?://\S+>?$
+
+# Allow the body of an if to be on the same line as the test if there is no
+# else.
+single-line-if-stmt=no
+
+# List of optional constructs for which whitespace checking is disabled
+no-space-check=trailing-comma,dict-separator
+
+# Maximum number of lines in a module
+max-module-lines=1000
+
+# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
+# tab).
+indent-string='    '
+
+# Number of spaces of indent required inside a hanging or continued line.
+indent-after-paren=4
+
+# Expected format of line ending, e.g. empty (any line ending), LF or CRLF.
+expected-line-ending-format=
+
+
+[LOGGING]
+
+# Logging modules to check that the string format arguments are in logging
+# function parameter format
+logging-modules=logging
+
+
+[MISCELLANEOUS]
+
+# List of note tags to take in consideration, separated by a comma.
+notes=FIXME,XXX,TODO
+
+
+[SIMILARITIES]
+
+# Minimum lines number of a similarity.
+min-similarity-lines=4
+
+# Ignore comments when computing similarities.
+ignore-comments=yes
+
+# Ignore docstrings when computing similarities.
+ignore-docstrings=yes
+
+# Ignore imports when computing similarities.
+ignore-imports=no
+
+
+[SPELLING]
+
+# Spelling dictionary name. Available dictionaries: none. To make it working
+# install python-enchant package.
+spelling-dict=
+
+# List of comma separated words that should not be checked.
+spelling-ignore-words=
+
+# A path to a file that contains private dictionary; one word per line.
+spelling-private-dict-file=
+
+# Tells whether to store unknown words to indicated private dictionary in
+# --spelling-private-dict-file option instead of raising a message.
+spelling-store-unknown-words=no
+
+
+[TYPECHECK]
+
+# Tells whether missing members accessed in mixin class should be ignored. A
+# mixin class is detected if its name ends with "mixin" (case insensitive).
+ignore-mixin-members=yes
+
+# List of module names for which member attributes should not be checked
+# (useful for modules/projects where namespaces are manipulated during runtime
+# and thus existing member attributes cannot be deduced by static analysis
+ignored-modules=
+
+# List of classes names for which member attributes should not be checked
+# (useful for classes with attributes dynamically set).
+ignored-classes=SQLObject
+
+# When zope mode is activated, add a predefined set of Zope acquired attributes
+# to generated-members.
+zope=no
+
+# List of members which are set dynamically and missed by pylint inference
+# system, and so shouldn't trigger E0201 when accessed. Python regular
+# expressions are accepted.
+generated-members=REQUEST,acl_users,aq_parent
+
+
+[VARIABLES]
+
+# Tells whether we should check for unused import in __init__ files.
+init-import=no
+
+# A regular expression matching the name of dummy variables (i.e. expectedly
+# not used).
+dummy-variables-rgx=_$|dummy
+
+# List of additional names supposed to be defined in builtins. Remember that
+# you should avoid to define new builtins when possible.
+additional-builtins=
+
+# List of strings which can identify a callback function by name. A callback
+# name must start or end with one of those strings.
+callbacks=cb_,_cb
+
+
+[CLASSES]
+
+# List of interface methods to ignore, separated by a comma. This is used for
+# instance to not check methods defines in Zope's Interface base class.
+ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
+
+# List of method names used to declare (i.e. assign) instance attributes.
+defining-attr-methods=__init__,__new__,setUp
+
+# List of valid names for the first argument in a class method.
+valid-classmethod-first-arg=cls
+
+# List of valid names for the first argument in a metaclass class method.
+valid-metaclass-classmethod-first-arg=mcs
+
+# List of member names, which should be excluded from the protected access
+# warning.
+exclude-protected=_asdict,_fields,_replace,_source,_make
+
+
+[DESIGN]
+
+# Maximum number of arguments for function / method
+max-args=5
+
+# Argument names that match this expression will be ignored. Default to name
+# with leading underscore
+ignored-argument-names=_.*
+
+# Maximum number of locals for function / method body
+max-locals=15
+
+# Maximum number of return / yield for function / method body
+max-returns=6
+
+# Maximum number of branch for function / method body
+max-branches=12
+
+# Maximum number of statements in function / method body
+max-statements=50
+
+# Maximum number of parents for a class (see R0901).
+max-parents=7
+
+# Maximum number of attributes for a class (see R0902).
+max-attributes=7
+
+# Minimum number of public methods for a class (see R0903).
+min-public-methods=2
+
+# Maximum number of public methods for a class (see R0904).
+max-public-methods=20
+
+
+[IMPORTS]
+
+# Deprecated modules which should not be used, separated by a comma
+deprecated-modules=regsub,TERMIOS,Bastion,rexec
+
+# Create a graph of every (i.e. internal and external) dependencies in the
+# given file (report RP0402 must not be disabled)
+import-graph=
+
+# Create a graph of external dependencies in the given file (report RP0402 must
+# not be disabled)
+ext-import-graph=
+
+# Create a graph of internal dependencies in the given file (report RP0402 must
+# not be disabled)
+int-import-graph=
+
+
+[EXCEPTIONS]
+
+# Exceptions that will emit a warning when being caught. Defaults to
+# "Exception"
+overgeneral-exceptions=Exception

+ 0 - 0
hackathon_starter/hackathon/scripts/__init__.py


+ 371 - 0
hackathon_starter/hackathon/scripts/github.py

@@ -0,0 +1,371 @@
+'''
+github.py contains a handful of methods for interacting
+with Github data and returning the responses as JSON.
+'''
+
+import requests
+import simplejson as json
+import urllib, urlparse
+
+########################
+# GITHUB API CONSTANTS #
+########################
+
+API_BASE_URL = 'https://api.github.com/users/'
+
+AUTHORIZE_URL = 'https://github.com/login/oauth/authorize'
+ACCESS_TOKEN_URL = 'https://github.com/login/oauth/access_token'
+
+class GithubOauthClient(object):
+    '''
+    Python Client for Github API.
+    '''
+    access_token = None
+    token_type = None
+
+    def __init__(self, client_id, client_secret):
+        '''
+        Parameters:
+            client_id: String
+                - The client_id from registering application
+                  on Github.
+            client_secret: String
+                - The client_secret from registering application
+                  on Github.
+        '''
+        self.client_id = client_id
+        self.client_secret = client_secret
+
+    def get_authorize_url(self):
+        '''
+        Obtains authorize url link with given client_id.
+
+        Returns:
+            authURL: String
+                - The authorization url.
+        '''
+
+        authSetting = {'client_id': self.client_id,
+                       'redirect_uri': 'http://127.0.0.1:8000/hackathon/',
+                       'scope': 'user, public_repo, repo, repo_deployment, notifications, gist'}
+        params = urllib.urlencode(authSetting)
+        authURL = AUTHORIZE_URL + '?' + params
+
+        return authURL
+
+    def get_access_token(self, code):
+        '''
+        Obtains access token.
+
+        Parameters:
+            code: String
+                - The code is retrieved from the authorization url parameter
+                  to obtain access_token.
+        '''
+
+        settings = {'client_id': self.client_id,
+                    'client_secret': self.client_secret,
+                    'code': code,
+                    'redirect_uri': 'http://127.0.0.1:8000/hackathon/',
+                    'accept': 'json'}
+        params = urllib.urlencode(settings)
+        accessLink = ACCESS_TOKEN_URL + '?' + params
+        req = requests.get(accessLink)
+
+        if int(req.status_code) != 200:
+            raise Exception('Invalid response %s' %req.status_code)
+
+        content = urlparse.parse_qs(req.content)
+        self.access_token = content['access_token'][0]
+        self.token_type = content['token_type'][0]
+        self.scopes = content['scope'][0]
+
+    def getUserInfo(self):
+        '''
+        Obtains user information.
+
+        Returns:
+            content: Dictionary
+                - A dictionary containing user information.
+        '''
+
+        link = 'https://api.github.com/user?access_token=' + self.access_token
+        req = requests.get(link)
+
+        if int(req.status_code) != 200:
+            raise Exception('Invalid response %s' %req.status_code)
+
+        content = json.loads(req.content)
+        self.username = content['login']
+        return content
+
+def getUserData(user, clientID, clientSecret):
+    '''
+    Returns data found on a Github User's public profile.
+    This includes information such as number of followers,
+    e-mail, number of repositories and more.
+
+    Parameters:
+        clientID: String
+            - The clientID from registering this application
+              on Github.
+        clientSecret: String
+            - The clientSecret from registering this application
+            on Github.
+
+    Returns:
+        parsedData: Dictionary
+            - A dictionary containing the following data:
+                - userData['name']
+                    - The user's public name on Github
+                - userData['blog']
+                    - Link to the user's blog on Github
+                - userData['email']
+                    - The user's public e-mail on Github
+                - userData['public_gists']
+                    - The number of the user's public gists
+                - userData['public_repos']
+                    - The number of public repositories owned
+                - userData['avatar_url']
+                    - Link to user's public avatar
+                - userData['followers']
+                    - Number of followers
+                - userData['following']
+                    - Number of users being followed
+    '''
+    url = API_BASE_URL + user +  '?' + clientID + '&' + clientSecret
+    print url
+    req = requests.get(url)
+    jsonList = []
+    jsonList.append(json.loads(req.content))
+    parsedData = []
+    userData = {}
+    for data in jsonList:
+        userData['name'] = data['name']
+        userData['blog'] = data['blog']
+        userData['email'] = data['email']
+        userData['public_gists'] = data['public_gists']
+        userData['public_repos'] = data['public_repos']
+        userData['avatar_url'] = data['avatar_url']
+        userData['followers'] = data['followers']
+        userData['following'] = data['following']
+    parsedData.append(userData)
+
+    return parsedData
+
+def getUserRepositories(user, clientID, clientSecret):
+    '''
+    Returns a list of all the public repositories
+    owned by a User.
+
+    Parameters:
+        clientID: String
+            - The clientID from registering this application
+              on Github.
+        clientSecret: String.
+            - The clientSecret from registering this application
+            on Github.
+
+    Returns:
+        repositories: List
+            - A list containing all public repository names
+              belonging to a user.
+    '''
+    pageNumber = 1
+    jsonList = []
+    repositories = []
+
+    while True:
+        req = requests.get('https://api.github.com/users/' + user + '/repos?page=' \
+            + str(pageNumber) + '&' + clientID + '&' + clientSecret)
+        jsonList.append(json.loads(req.content))
+        if len(json.loads(req.content)) < 30:
+            break
+        elif len(json.loads(req.content)) >= 30:
+            pageNumber += 1
+    for data in jsonList:
+        for datum in data:
+            repositories.append(datum['name'])
+    return repositories
+
+def getForkedRepositories(user, clientID, clientSecret):
+    '''
+    Returns a list of all the public forked repositories
+    owned by a User.
+
+    Parameters:
+        clientID: String
+            - The clientID from registering this application
+              on Github.
+        clientSecret: String.
+            - The clientSecret from registering this application
+            on Github.
+
+    Returns:
+        forkedRepositories: List
+            - A list containing all forked repository names
+              belonging to a user.
+    '''
+
+    pageNumber = 1
+    jsonList = []
+    forkedRepositories = []
+    while True:
+        req = requests.get('https://api.github.com/users/' + user + '/repos?page=' \
+            + str(pageNumber) + '&' + clientID + '&' + clientSecret)
+        jsonList.append(json.loads(req.content))
+        if len(json.loads(req.content)) < 30:
+            break
+        elif len(json.loads(req.content)) >= 30:
+            pageNumber += 1
+
+
+    forkedRepos = {}
+    for data in jsonList:
+        for datum in data:
+            if datum['fork'] == True:
+                forkedRepos['name'] = datum['name']
+                forkedRepositories.append(forkedRepos)
+                forkedRepos = {}
+
+    return forkedRepositories
+
+def getTopContributedRepositories(user, repos, clientID, clientSecret):
+    '''
+    Returns a list containing the commit totals for all
+    repositories owned by a user.
+
+    Parameters:
+        clientID: String
+            - The clientID from registering this application
+              on Github.
+        clientSecret: String
+            - The clientSecret from registering this application
+            on Github.
+
+    Returns:
+        parsedData: Dictionary
+            - A dictionary containing the following data:
+                - commits['author']
+                    - The name of the committer
+                - commits['total']
+                    - Total commit count for a user in a repository
+                - commits['repo_name']
+                    - The name of the repository being tallied
+    '''
+    jsonList = []
+    for repo in repos:
+        req = requests.get('https://api.github.com/repos/' + user + '/' + repo \
+            + '/stats/contributors' + '?' + clientID + '&' + clientSecret)
+        jsonList.append(json.loads(req.content))
+
+    parsedData = []
+
+    indexNumber = -1
+    for item in jsonList:
+        indexNumber += 1
+        commits = {}
+        for data in item:
+            if data['author']['login'] == user:
+                commits['author'] = data['author']['login']
+                commits['total'] = data['total']
+                commits['repo_name'] = repos[indexNumber]
+                parsedData.append(commits)
+
+    return parsedData
+
+def filterCommits(data):
+    '''
+    Returns the top 10 committed repositories.
+
+    Parameters:
+        data: List
+            - A list containing commit counts for all
+            of a user's public repositories
+
+    Returns:
+        maxCommits: List
+            - A list containing the top ten repositories
+            with the maximum number of commits by a user
+    '''
+
+    maxCommits = []
+    i = 0
+    while i < 10:
+        maxCommitedRepo = max(data, key=lambda x: x['total'])
+        maxCommits.append(maxCommitedRepo)
+        index = data.index(maxCommitedRepo)
+        data.pop(index)
+        i += 1
+    return maxCommits
+
+def getStarGazerCount(user, clientID, clientSecret):
+    '''
+    Returns a list number of stargazers for each
+    of a user's public repositories.
+
+    Parameters:
+        clientID: String
+            - The clientID from registering this application
+              on Github.
+        clientSecret: String
+            - The clientSecret from registering this application
+            on Github.
+
+    Returns:
+        stargazers: Dictionary
+            - A dictionary containing the following data:
+                - starData['stargazers_count']
+                    - The number of stargazers for a given repository
+                - starData['name']
+                    - The name of the repository being observed
+    '''
+    pageNumber = 1
+    jsonList = []
+    stargazers = []
+    while True:
+        req = requests.get('https://api.github.com/users/' + user + '/repos?page=' \
+            + str(pageNumber) + '&' + clientID + '&' + clientSecret)
+        jsonList.append(json.loads(req.content))
+        if len(json.loads(req.content)) < 30:
+            break
+        elif len(json.loads(req.content)) >= 30:
+            pageNumber += 1
+
+
+    for data in jsonList:
+        for datum in data:
+            starData = {}
+            starData['stargazers_count'] = datum['stargazers_count']
+            starData['name'] = datum['name']
+            stargazers.append(starData)
+
+    return stargazers
+
+def filterStarGazerCount(data):
+    '''
+    Returns the top 10 stargazed repositories.
+
+    Parameters:
+        data: List
+            - A list containing stargazer counts for all
+            of a user's public repositories
+
+    Returns:
+        maxStars: List
+            - A list containing the top ten repositories
+            with the maximum number of stargazers
+    '''
+    maxStars = []
+    i = 0
+    while i < 10:
+        maxStarGazers = max(data, key=lambda x: x['stargazers_count'])
+        maxStars.append(maxStarGazers)
+        index = data.index(maxStarGazers)
+        data.pop(index)
+        i += 1
+    return maxStars
+
+
+
+

+ 248 - 0
hackathon_starter/hackathon/scripts/instagram.py

@@ -0,0 +1,248 @@
+'''
+instagram.py contains a handful of methods for interacting
+with Instagram data and returning the responses as JSON.
+'''
+
+import requests
+import urllib
+import urllib2
+import json
+import simplejson as json2
+import googlemaps
+from django.conf import settings
+from datetime import datetime
+
+AUTHORIZATION_URL = 'https://api.instagram.com/oauth/authorize/?client_id='
+ACCESS_TOKEN_URL = 'https://api.instagram.com/oauth/access_token'
+
+class InstagramOauthClient(object):
+    '''
+    Python Client for Instagram API.
+    '''
+
+    access_token = None
+    user_data = None
+    is_authorized = False
+
+    def __init__(self, client_id, client_secret):
+        '''
+        Parameters:
+            client_id: String
+                - The client_id from registering application
+                  on Instagram.
+            client_secret: String
+                - The client_secret from registering application
+                  on Instagram.
+        '''
+        self.client_id = client_id
+        self.client_secret = client_secret
+
+
+    def get_authorize_url(self):
+        '''
+        Obtains authorize url link with given client_id.
+
+        Returns:
+            authURL: String
+                - The authorization url.
+        '''
+
+        redirectUri = '&redirect_uri=http://127.0.0.1:8000/hackathon/&response_type=code'
+        authURL = AUTHORIZATION_URL + self.client_id + redirectUri
+        #print authURL
+        return authURL
+
+    def get_access_token(self, code):
+        '''
+        Obtains access token.
+
+        Parameters:
+            code: String
+                - The code is retrieved from the authorization url parameter
+                  to obtain access_token.
+        '''
+
+        authSetting = {
+            'client_id' : self.client_id,
+            'client_secret' : self.client_secret,
+            'grant_type' : 'authorization_code',
+            'redirect_uri' : 'http://127.0.0.1:8000/hackathon/',
+            'code' : code}
+
+        authSettingUrl = urllib.urlencode(authSetting)
+        req = urllib2.Request(ACCESS_TOKEN_URL, authSettingUrl)
+        content = urllib2.urlopen(req)
+        jsonlist = json.load(content)
+        self.access_token = jsonlist['access_token']
+        self.user_data = jsonlist['user']
+        self.is_authorized = True
+
+
+
+
+
+
+
+def searchForLocation(address):
+    '''
+    Parameters:
+        address: String
+            - The address is a user input.
+
+    Returns:
+        location: Dictionary
+            - A dictionary returning the latitude, and longitude
+              of an address.
+    '''
+
+    gmaps = googlemaps.Client(key=settings.GOOGLEMAP_API_KEY)
+    #geocoding and address
+    geocodeResult = gmaps.geocode(address)
+
+    if geocodeResult:
+        location = geocodeResult[0]['geometry']['location']
+        return location
+
+
+def getTaggedMedia(tag, accessToken):
+    '''
+    Get recent tagged media.
+
+    Parameters:
+        tag: String
+            - The tag used to search the most recent media that's tagged with it.
+
+    Returns:
+        data: Dictionary
+            - A dictionary containing recent tagged 120 media
+              counts data pertaining to each media.
+    '''
+
+    tagUri = 'https://api.instagram.com/v1/tags/'
+    taggedMediaUrl = tagUri + tag + '/media/recent?access_token=' + accessToken
+    req = requests.get(taggedMediaUrl)
+    content = json2.loads(req.content)
+    data = content['data']
+
+    while len(data) <= 100:
+        nextUrl = content['pagination']['next_url']
+        req = requests.get(nextUrl)
+        content = json2.loads(req.content)
+        for i in content['data']:
+            data.append(i)
+    #print len(data)
+    return data
+
+
+def getUserInfo(accessToken):
+    '''
+    Get user information.
+
+    Parameters:
+        access_token: String
+            - The access_token given after granting permission
+              application access to Instagram data.
+
+    Returns:
+        data: Dictionary
+            - A dictionary containing user information.
+    '''
+
+    userInfo = 'https://api.instagram.com/v1/users/32833691/?access_token='+accessToken
+    req = requests.get(userInfo)
+    content = json2.loads(req.content)
+    data = content['data']
+    return data
+
+
+def getUserMedia(userId, accessToken):
+    '''
+    Parameters:
+        accessToken: String
+            - The access_token given after granting permission
+              application access to Instagram data.
+        userId: Integer
+            - User's instagram ID number.
+
+    Returns:
+        data: Dictionary
+            - A dictionary containing user media information.
+    '''
+
+    userMediaUri = 'https://api.instagram.com/v1/users/' + str(userId)
+    userMedia = userMediaUri + '/media/recent/?access_token=' + accessToken
+    req = requests.get(userMedia)
+    content = json2.loads(req.content)
+    data = content['data']
+    return data
+
+
+def searchLocationIds(lat, lng, accessToken):
+    '''
+    Parameters:
+        lat: Float
+            - The latitude of the input address
+        lng: Float
+            - The longitude of the input address
+
+    Returns:
+        listOfIds: Dictionary
+            - A dictionary returning the list of location ids
+              of the given address coordinates.
+    '''
+
+    locIdUri = 'https://api.instagram.com/v1/locations/search?lat=' + str(lat)
+    location = locIdUri+'&lng='+str(lng)+'&access_token='+ accessToken+'&distance=5000'
+    req = requests.get(location)
+    data = json2.loads(req.content)
+    listOfIds = []
+    if data['meta']['code'] != 200:
+        raise Exception("Invalid response %s." % data['meta']['code'])
+    searchIds = data['data']
+    for data in searchIds:
+        for i in data:
+            if i == 'id':
+                listOfIds.append(data[i])
+    return listOfIds
+
+
+def searchLocationMedia(listOfLocationIds, accessToken):
+    '''
+    Parameters:
+        listOfLocationIds: Float
+            - list of location ids retrieve from coordinate of
+              of searched address.
+        access_token: String
+            - The access_token given after granting permission
+              application access to Instagram data.
+
+    Returns:
+        media: Dictionary
+            - A dictionary returning the list of recent media
+              of the list of location ids.
+    '''
+
+    media = []
+    locationUri = 'https://api.instagram.com/v1/locations/'
+    for location in listOfLocationIds:
+        mediaByLocation = locationUri+location+'/media/recent?access_token='+ accessToken
+        req = requests.get(mediaByLocation)
+        contentAll = json2.loads(req.content)
+        if contentAll['pagination']:
+            tempMedia = []
+            nextUrl = contentAll['pagination']['next_url']
+            req = requests.get(nextUrl)
+            content = json2.loads(req.content)
+            for i in content['data']:
+                i['created_time'] = datetime.fromtimestamp(int(i['created_time']))
+                i['created_time'] = i['created_time'].strftime('%Y-%m-%d %H:%M:%S')
+                tempMedia.append(i)
+            media += [tempMedia]
+        else:
+            for i in contentAll['data']:
+                for data in i:
+                    if data == 'created_time':
+                        i[data] = datetime.fromtimestamp(int(i[data]))
+                        i[data] = i[data].strftime('%Y-%m-%d %H:%M:%S')
+            media.append(contentAll['data'])
+    return media

+ 62 - 0
hackathon_starter/hackathon/scripts/linkedin.py

@@ -0,0 +1,62 @@
+
+
+import simplejson as json
+import requests
+import urlparse, urllib
+
+AUTHORIZATION_URL = 'https://www.linkedin.com/uas/oauth2/authorization'
+ACCESS_TOKEN_URL = 'https://www.linkedin.com/uas/oauth2/accessToken'
+
+class LinkedinOauthClient(object):
+
+    is_authorized = False
+
+    def __init__(self, client_id, client_secret):
+        self.client_id = client_id
+        self.client_secret = client_secret
+
+    def get_authorize_url(self):
+        auth_setting = {'response_type' : 'code',
+                        'client_id' : self.client_id,
+                        'client_secret' : self.client_secret,
+                        'redirect_uri' : 'http://127.0.0.1:8000/hackathon/',
+                        'state' : 'DCEeFWf45A53sdfKef424',
+                        'scope': 'r_fullprofile'}
+
+        params = urllib.urlencode(auth_setting)
+        authURL = AUTHORIZATION_URL + '?' + params
+        return authURL
+
+    def get_access_token(self, code):
+        settings = {'grant_type' : 'authorization_code',
+                    'code' : code,
+                    'redirect_uri' : 'http://127.0.0.1:8000/hackathon/',
+                    'client_id' : self.client_id,
+                    'client_secret': self.client_secret}
+
+        header = {'content-type' : 'application/x-www-form-urlencoded'}
+        params = urllib.urlencode(settings)
+        link = ACCESS_TOKEN_URL + '?' + params
+        req = requests.post(link)#, headers=header)
+
+        if req.status_code != 200:
+            raise Exception('Invalid response %s' %req.status_code)
+
+        content = json.loads(req.content)
+        self.access_token = content['access_token']
+        self.is_authorized = True
+
+    def getUserInfo(self):
+        #link = 'https://api.linkedin.com/v1/people/~?format=json&oauth2_access_token=' + self.access_token
+        link = 'https://api.linkedin.com/v1/people/~:(id,first-name,skills,educations,languages,twitter-accounts)?oauth2_access_token='+self.access_token
+        headers = {'x-li-format' : 'json',
+                   'content-type' : 'application/json'}
+        req = requests.get(link, headers=headers)
+        content = json.loads(req.content)
+
+        if req.status_code != 200:
+            raise Exception('Invalid response %s' %req.status_code)
+
+        self.user_id = content['id']
+        print content
+        return content

+ 24 - 0
hackathon_starter/hackathon/scripts/meetup.py

@@ -0,0 +1,24 @@
+'''
+meetup.py aggregates various data from meetup.com.
+'''
+
+import requests
+import simplejson as json
+
+USERDATA = 'https://api.meetup.com/2/member/self/?access_token='
+
+def retrieveUserData(url):
+    '''Returns user profile info from meetup.com profile'''
+    req = requests.get(url)
+    content = json.loads(req.content)
+    filteredData = []
+    data = {}
+    data['name'] = content['name']
+    data['country'] = content['country'].upper()
+    data['city'] = content['city']
+    data['state'] = content['state']
+    data['status'] = content['status']
+    filteredData.append(data)
+    return filteredData
+
+

+ 22 - 0
hackathon_starter/hackathon/scripts/nytimes.py

@@ -0,0 +1,22 @@
+'''module containing a handful of methods for aggregating
+data from the NY Times.'''
+
+import requests
+import json
+
+def fetcharticle(apikey, url):
+    '''returns the JSON data of the most
+    popular articles by view from the past 24 hours.'''
+    parameters = {'api-key' : apikey}
+    req = requests.get(url, params=parameters)
+    data = json.loads(req.content)
+    parsedData = []
+    for datum in data['results']:
+        newData = {
+            "title": datum["title"],
+            "abstract": datum["abstract"],
+            "section": datum["section"],
+            "byline": datum["byline"],
+        }
+        parsedData.append(newData)
+    return parsedData

+ 27 - 0
hackathon_starter/hackathon/scripts/quandl.py

@@ -0,0 +1,27 @@
+'''Module containing a handful of methods for
+aggregating data from markets throughout the world'''
+
+import requests
+import json
+
+def fetchData(apikey, url):
+    '''Returns JSON data of the Dow Jones Average.'''
+    parameters = {'rows' : 1, 'auth_token' : apikey}
+    req = requests.get(url, params=parameters)
+    data = json.loads(req.content)
+    parsedData = []
+    stockData = {}
+    if data['code'] == 'COMP':
+        stockData['name'] = data['name']
+        stockData['description'] = '''The NASDAQ Composite Index measures all
+        NASDAQ domestic and international based common type stocks listed \
+        on The NASDAQ Stock Market.'''
+        stockData['data'] = data['data']
+        stockData['code'] = data['code']
+    else:
+        stockData['name'] = data['name']
+        stockData['description'] = data['description']
+        stockData['data'] = data['data']
+        stockData['code'] = data['code']
+    parsedData.append(stockData)
+    return parsedData

+ 121 - 0
hackathon_starter/hackathon/scripts/scraper.py

@@ -0,0 +1,121 @@
+# pylint: disable=line-too-long
+
+'''
+scraper.py contains various methods for scraping
+HTML content and packaging into dictionaries.
+'''
+
+import requests
+from bs4 import BeautifulSoup
+
+def fetchHTML(url):
+    '''
+    Returns HTML retrived from a url.
+
+    Parameters:
+        url: String
+            - The URL to fetch HTML from
+
+    Returns:
+        html: String
+            - The HTML from a given URL
+    '''
+    req = requests.get(url)
+    html = req.text
+    return html
+
+def extractTag(content, tag, className=None):
+    '''
+    Returns data embed within a tag, along
+    with an optional class for filtering.
+
+    Parameters:
+        content: String
+            - The HTML to parse
+        tag: String
+            - The HTML tag to scan for
+        class: String
+            - Optional filter for tag
+
+    Returns:
+        filteredData: List
+            - Content embed within searched tags
+    '''
+    soup = BeautifulSoup(content)
+    data = soup.findAll(tag, {'class': className})
+    filteredData = []
+    for datum in data:
+        filteredData.append(datum.text)
+    return filteredData
+
+
+def steamDiscounts():
+    '''Returns discounts from steam.com'''
+    req = requests.get('http://store.steampowered.com/search/?specials=1#sort_by=_ASC&sort_order=ASC&specials=1&page=1')
+    content = req.text
+    soup = BeautifulSoup(content)
+    allData = {id: {} for id in range(0, 25)}
+
+    # Get all divs of a specific class
+    releaseDate = soup.findAll('div', {'class': 'col search_released'})
+
+    # Get all release dates
+    releaseDates = []
+    id = 0
+    for date in releaseDate:
+        allData[id]['releaseDates'] = date.text
+        releaseDates.append(date.text)
+        id += 1
+
+    #print releaseDates
+
+    id = 0
+    gameName = soup.findAll('div', {'class': 'col search_name ellipsis'})
+
+    # Get all game names
+    gameNames = []
+    for name in gameName:
+        span = name.findAll('span', {'class': 'title'})
+        for tag in span:
+            allData[id]['name'] = tag.text
+            gameNames.append(tag.text)
+            id += 1
+
+    # print gameNames
+
+    discount = soup.findAll('div', {'class': 'col search_discount'})
+
+    id = 0
+    # Get all game discounts
+    gameDiscounts = []
+    for discountedGame in discount:
+        span = discountedGame.findAll('span')
+        for tag in span:
+            allData[id]['discount'] = tag.text
+            gameDiscounts.append(tag.text)
+            id += 1
+
+    # print gameDiscounts
+
+    price = soup.findAll('div', {'class': 'col search_price discounted'})
+
+    id = 0
+    prices = []
+    # Get all discounted prices
+    for value in price:
+        br = value.findAll('br')
+        for tag in br:
+            allData[id]['price'] = tag.text.strip('\t')
+            prices.append(tag.text.strip('\t'))
+            id += 1
+
+    # Cleanup data
+    newData = []
+    for datum in allData:
+        newData.append(allData[datum])
+    # print prices
+    return newData
+
+
+
+

+ 55 - 0
hackathon_starter/hackathon/scripts/steam.py

@@ -0,0 +1,55 @@
+'''This script contains methods belonging to the Steam web API
+that can collect information based on an user's gaming library.'''
+import requests
+import json
+
+def gamespulling(steamid, apikey):
+    '''Returns the JSON data from the Steam API based of one's
+    Steam ID number and returns a dictionary of
+    gameids and minutes played.'''
+    steaminfo = {
+        'key': apikey,
+        'steamid': steamid,
+        'format':'JSON',
+        'include_appinfo':'1'
+    }
+    apiurl = 'http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/'
+    req = requests.get(apiurl, params=steaminfo)
+    data = json.loads(req.content)
+    return data['response']['games']
+
+def steamidpulling(steamun, apikey):
+    '''Pulls out and returns the steam id number for use in steam queries.'''
+    steaminfo = {'key': apikey, 'vanityurl': steamun}
+    apiurl = 'http://api.steampowered.com/ISteamUser/ResolveVanityURL/v0001/'
+    req = requests.get(apiurl, params=steaminfo)
+    data = json.loads(req.content)
+    steamid = data['response']['steamid']
+    return steamid
+
+def steamlibrarypull(steamid, apikey):
+    '''Pulls out a CSV of Steam appids.'''
+    steaminfo = {
+        'key': apikey,
+        'steamid': steamid,
+        'format':'JSON',
+        'include_appinfo':'1'
+    }
+    url = 'http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/'
+    req = requests.get(url, params=steaminfo)
+    data = json.loads(req.content)
+    response = data['response']['games']
+    games = {}
+    for game in response:
+        url = 'http://store.steampowered.com/api/appdetails/?appids=%d&filters=price_overview&cc=us'
+        getprice = requests.get(url % game['appid'])
+        if getprice.status_code == 200:
+            rjson = json.loads(getprice.text)
+            # use the appid to fetch the value and convert to decimal
+            # appid is numeric, cast to string to lookup the price
+            try:
+                price = rjson[str(game['appid'])]['data']['price_overview']['initial'] * .01
+            except KeyError:
+                pass
+            games[game['name']] = {'price': price, 'appid': game['appid']}
+    return games

+ 151 - 0
hackathon_starter/hackathon/scripts/tumblr.py

@@ -0,0 +1,151 @@
+# pylint: disable=invalid-name
+# pylint: disable=too-many-instance-attributes
+
+'''
+tumblr.py contains methods for authenticating
+the user via tumblr OAuth as well as methods
+for getting data from Tumblr API.
+'''
+
+
+import requests
+import simplejson as json
+import time
+import re
+from bs4 import BeautifulSoup
+import urlparse
+import oauth2
+
+request_token_url = 'http://www.tumblr.com/oauth/request_token'
+authorize_url = 'http://www.tumblr.com/oauth/authorize'
+access_token_url = 'http://www.tumblr.com/oauth/access_token'
+
+user_uri = "http://api.tumblr.com/v2/user/info"
+blog_uri = "http://api.tumblr.com/v2/blog/"
+
+class TumblrOauthClient(object):
+    '''
+    Class responsible for authenticating the user
+    via Tumblr OAuth2.
+    '''
+    token = None
+    oauth_verifier = None
+    oauth_token = None
+    oauth_token_secret = None
+    accessed = False
+
+    def __init__(self, consumer_key, consumer_secret):
+        self.consumer_key = consumer_key
+        self.consumer_secret = consumer_secret
+        self.consumer = oauth2.Consumer(consumer_key, consumer_secret)
+
+    def authorize_url(self):
+        '''
+        Redirects user to authorize use.
+        '''
+        client = oauth2.Client(self.consumer)
+        resp, content = client.request(request_token_url, "GET")
+        #parse content
+        if not self.oauth_token:
+            request_token = dict(urlparse.parse_qsl(content))
+            self.oauth_token = request_token['oauth_token']
+            self.oauth_token_secret = request_token['oauth_token_secret']
+        link = authorize_url + "?oauth_token=" + self.oauth_token + \
+            "&redirect_uri=http%3A%2F%2Flocalhost%3A8000/hackathon/tumblr"
+        return link
+
+
+    def access_token_url(self, oauth_verifier=''):
+        '''
+        Returns an access token to the user.
+        '''
+        self.accessed = True
+        token = oauth2.Token(self.oauth_token, self.oauth_token_secret)
+        self.oauth_verifier = oauth_verifier
+        print self.oauth_verifier
+        token.set_verifier(self.oauth_verifier)
+        client = oauth2.Client(self.consumer, token)
+        resp, content = client.request(access_token_url, "POST")
+        access_token = dict(urlparse.parse_qsl(content))
+        #set verified token
+        self.token = oauth2.Token(access_token['oauth_token'], access_token['oauth_token_secret'])
+
+    def getUserInfo(self):
+        ''' Returns users information. '''
+        client = oauth2.Client(self.consumer, self.token)
+        #print client
+        resp, content = client.request(user_uri, "POST")
+        if int(resp['status']) != 200:
+            raise Exception("Invalid response %s." % resp['status'])
+
+        #return content in json format
+        jsonlist = json.loads(content)
+        response = jsonlist['response']
+        user_info = response['user']
+        total_blogs = len(user_info['blogs'])
+        #print user_info
+        return user_info, total_blogs
+
+
+    def getBlogInfo(self, user):
+        ''' Returns blogger's blog information '''
+        blog_info = blog_uri + user + ".tumblr.com/info?api_key="+self.consumer_key
+        req = requests.get(blog_info)
+        jsonlist = json.loads(req.content)
+        response = jsonlist['response']
+        blog = response['blog']
+        blog['updated'] = time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(blog['updated']))
+        return blog
+
+
+    def getTaggedInfo(self, tag):
+        ''' Return tags related to blog with certain tag. '''
+
+        tagged_uri = "http://api.tumblr.com/v2/tagged?tag=" + tag + "&api_key=" + \
+            self.consumer_key + "&limit=20"
+        req = requests.get(tagged_uri)
+        jsonlist = json.loads(req.content)
+        tags = []
+        body = jsonlist['response']
+        for blog in body:
+            for data in blog:
+                if data == "tags":
+                    #print blog[data]
+                    for i in blog[data]:
+                        m = re.match("(.*)(s*)s(t*)t(a*)a(r*)r(b*)b(u*)u(c*)c(k*)k(.*)", i.lower())
+                        if not m:
+                            tags.append(i)
+
+        return tags
+
+
+    def getTaggedBlog(self, tag):
+        ''' Return the tagged blogs's captions or post.'''
+
+        tagged_uri = "http://api.tumblr.com/v2/tagged?tag=" + tag + "&api_key=" + \
+            self.consumer_key + "&limit=20"
+        req = requests.get(tagged_uri)
+        jsonlist = json.loads(req.content)
+        body = jsonlist['response']
+
+        tagtext = []
+
+        for blog in body:
+            #print "####"
+            for data in blog:
+                #post
+                if data == "body":
+                    if blog[data]:
+                        #print blog[data]
+                        soup = BeautifulSoup(blog[data])
+                        text = soup.get_text()
+                        tagtext.append(text)
+                #an image
+                if data == "caption":
+                    if blog[data]:
+                        #print blog[data]
+                        soup = BeautifulSoup(blog[data])
+                        text = soup.get_text()
+                        tagtext.append(text)
+
+        return tagtext

+ 19 - 0
hackathon_starter/hackathon/scripts/twilioapi.py

@@ -0,0 +1,19 @@
+# pylint: disable=invalid-name
+# pylint: disable=unused-variable
+
+'''
+Twilioapi.py is responsible for sending
+a message from a registered Twilio number
+to a user's phone.
+'''
+from twilio.rest import TwilioRestClient
+
+account_sid = "AC7889a1889c1833bd7181e45e60372776"
+auth_token = "1ad0315f3cc7a154aaaef048f1304f71"
+client = TwilioRestClient(account_sid, auth_token)
+
+def sendSMS(body, to, sender):
+
+    '''Sends a message to a given number'''
+    message = client.messages.create(body=body, to=to, from_=sender)
+    return

+ 304 - 0
hackathon_starter/hackathon/scripts/twitter.py

@@ -0,0 +1,304 @@
+# pylint: disable=too-many-instance-attributes
+# pylint: disable=unused-variable
+# pylint: disable=too-many-arguments
+
+'''
+twitter.py contains a handful of methods for interacting
+with Twitter data and returning the responses as JSON.
+'''
+
+
+import urlparse
+import oauth2 as oauth
+import requests
+import base64, random
+import urllib
+import binascii
+import time, collections, hmac, hashlib
+import simplejson as json2
+import codecs
+import json
+
+REQUEST_TOKEN_URL = 'https://api.twitter.com/oauth/request_token'
+ACCESS_TOKEN_URL = 'https://api.twitter.com/oauth/access_token'
+AUTHORIZE_URL = 'https://api.twitter.com/oauth/authorize'
+
+class TwitterOauthClient(object):
+    '''
+    Python Client for Twitter API.
+    '''
+
+    oauth_token = None
+    oauth_token_secret = None
+    username = None
+    is_authorized = False
+
+
+    def __init__(self, consumer_key, consumer_secret, access_token, access_token_secret):
+        '''
+        Parameters:
+            consumer_key: String
+                - The consumer_key from registering application
+                  on Instagram.
+            consumer_secret: String
+                - The consumer_secret from registering application
+                  on Instagram.
+        '''
+
+        self.consumer_key = consumer_key
+        self.consumer_secret = consumer_secret
+        self.access_token = access_token
+        self.access_token_secret = access_token_secret
+        self.consumer = oauth.Consumer(key=self.consumer_key, secret=self.consumer_secret)
+
+
+    def get_authorize_url(self):
+        '''
+        Obtained oauth_token and oauth_token_secret from request_token_url,
+        returns an authorize url.
+
+        From the redirect url, we obtain the oauth verifier.
+
+        Returns:
+            authURL: String
+                - The authorization url.
+        '''
+
+        client = oauth.Client(self.consumer)
+        resp, content = client.request(REQUEST_TOKEN_URL, 'GET')
+
+        #if int(resp['status']) != 200:
+        #    raise Exception('Invalid response %s' %resp['status'])
+
+        requestToken = dict(urlparse.parse_qsl(content))
+
+        #temporary
+        self.oauth_token = requestToken['oauth_token']
+        self.oauth_token_secret = requestToken['oauth_token_secret']
+        #print self.oauth_token
+
+        #link to authorize app access twitter data and return to twitter api example page
+        redirectUri = '&redirect_uri=http%3A%2F%2Flocalhost%3A8000/hackathon/twitter/'
+        authURL = AUTHORIZE_URL+"?oauth_token="+self.oauth_token+redirectUri
+        return authURL
+
+
+    def get_access_token_url(self, oauthVerifier):
+        '''
+        Get access token from redirect url.
+
+        Parameters:
+            oauthVerifier: String
+                - A paramater retrieved from scraping the redirect url.
+
+        Returns:
+            data: Dictionary
+                - A dictionary containing recent tagged 120 media
+                  counts data pertaining to each media.
+        '''
+
+        token = oauth.Token(self.oauth_token, self.oauth_token_secret)
+        token.set_verifier(oauthVerifier)
+
+        client = oauth.Client(self.consumer, token)
+        resp, content = client.request(ACCESS_TOKEN_URL, 'POST')
+
+        if int(resp['status']) != 200:
+            raise Exception('Invalid response %s' %resp['status'])
+
+        #print content
+        accessToken = dict(urlparse.parse_qsl(content))
+
+        #permanent
+        self.oauth_token = accessToken['oauth_token']
+        self.oauth_token_secret = accessToken['oauth_token_secret']
+        self.username = accessToken['screen_name']
+        self.is_authorized = True
+
+
+    def get_tweets(self, tweet):
+        '''
+        Get tweets of relevant search query.
+        '''
+        method = 'get'
+        link = 'https://api.twitter.com/1.1/search/tweets.json'
+        linkParameters = {'q': tweet, 'count': '100', 'result_type': 'popular'}
+
+        oauthParameters = getOauthParameters(
+            self.consumer_key,
+            self.access_token
+        )
+
+        oauthParameters['oauth_signature'] = generateSignature(
+            method,
+            link,
+            linkParameters,
+            oauthParameters,
+            self.consumer_secret,
+            self.access_token_secret
+        )
+
+        headers = {'Authorization': createAuthHeader(oauthParameters)}
+
+        link += '?' + urllib.urlencode(linkParameters)
+
+        req = requests.get(link, headers=headers)
+
+        if int(req.status_code) != 200:
+            raise Exception('Invalid response %s' %req.status_code)
+
+        content = json2.loads(req.content)
+
+        jsonlist = {}
+        for contrib in content['statuses']:
+            for e in contrib:
+                if e == 'retweet_count':
+                    if contrib['user']['screen_name'] in jsonlist:
+                        jsonlist[contrib['user']['screen_name']][contrib[e]] = str(contrib['text'].encode('ascii', 'ignore'))
+                    else:
+                        jsonlist[contrib['user']['screen_name']] = { contrib[e]:str(contrib['text'].encode('ascii', 'ignore'))}
+                    
+
+        return content['statuses'], json.dumps(jsonlist)
+
+
+    def get_trends_available(self, yahooConsumerKey):
+        '''
+        Get the locations that Twitter has trending topic information for.
+
+        '''
+
+        method = 'get'
+        link = 'https://api.twitter.com/1.1/trends/available.json'
+        linkParameters = {}
+
+        oauthParameters = getOauthParameters(
+            self.consumer_key,
+            self.access_token
+        )
+
+        oauthParameters['oauth_signature'] = generateSignature(
+            method,
+            link,
+            linkParameters,
+            oauthParameters,
+            self.consumer_secret,
+            self.access_token_secret
+        )
+
+        headers = {'Authorization': createAuthHeader(oauthParameters)}
+
+        if linkParameters:
+            link += '?'+urllib.urlencode(linkParameters)
+
+        req = requests.get(link, headers=headers)
+        #print req.status_code
+
+        if int(req.status_code) != 200:
+            raise Exception('Invalid response %s' %req.status_code)
+
+        content = json2.loads(req.content)
+        #print len(content)
+
+        for place in content:
+            for item in place:
+                if item == 'url':
+                    url = place[item]+'/neighbors?appid='+yahooConsumerKey+'&format=json'
+                    requestNeighborData = requests.get(url)
+                    #print request_neighbor_data.status_code
+                    if requestNeighborData.status_code == 200:
+                        neighbor = json2.loads(requestNeighborData.content)
+                    else:
+                        neighbor = {}
+
+            place['neighbor'] = neighbor
+                    #print place
+
+
+        return content
+
+
+
+def percentEncode(string):
+    '''
+    Percent encode strings.
+    '''
+    return urllib.quote(string, safe='~')
+
+
+def getNonce():
+    '''
+    Generate unique token per request.
+    '''
+
+    nonce = base64.b64encode(''.join([str(random.randint(0, 9)) for i in range(24)]))
+    return nonce
+
+def generateSignature(method, link, linkParameters, oauthParameters,
+                      oauthConsumerSecret, oauthTokenSecret=None):
+    '''
+    Generate signature.
+    '''
+
+    if linkParameters:
+        newDict = dict(oauthParameters, **linkParameters)
+        params = urllib.urlencode(collections.OrderedDict(sorted(newDict.items())))
+    else:
+        params = urllib.urlencode(collections.OrderedDict(sorted(oauthParameters.items())))
+
+    #Create your Signature Base String
+    signatureBaseString = (method.upper()+'&'+percentEncode(str(link))+'&'+percentEncode(params))
+
+    #Get the signing key
+    signingKey = createSigningKey(oauthConsumerSecret, oauthTokenSecret)
+
+    return calculateSignature(signingKey, signatureBaseString)
+
+
+
+def calculateSignature(signingKey, signatureBaseString):
+    '''
+    Calculate signature using HMAC-SHA1 hashing algorithm.
+    '''
+    hashed = hmac.new(signingKey, signatureBaseString, hashlib.sha1)
+
+    sig = binascii.b2a_base64(hashed.digest())[:-1]
+
+    return percentEncode(sig)
+
+
+def createSigningKey(oauthConsumerSecret, oauthTokenSecret):
+    '''
+    Creates a key to sign the request with.
+    '''
+
+    signingKey = percentEncode(oauthConsumerSecret) + '&' + percentEncode(oauthTokenSecret)
+
+    return signingKey
+
+
+def createAuthHeader(parameters):
+    '''
+    Format authorization header with oath parameters.
+    '''
+
+    orderedParameters = collections.OrderedDict(sorted(parameters.items()))
+    authHeader = ('%s="%s"' % (k, v) for k, v in orderedParameters.iteritems())
+
+    return "OAuth " + ', '.join(authHeader)
+
+
+def getOauthParameters(consumerKey, accessToken):
+    '''
+    Returns parameters for making requests.
+    '''
+    oauthParameters = {
+        'oauth_timestamp': str(int(time.time())),
+        'oauth_signature_method': "HMAC-SHA1",
+        'oauth_version': "1.0",
+        'oauth_token': accessToken,
+        'oauth_nonce': getNonce(),
+        'oauth_consumer_key': consumerKey
+    }
+
+    return oauthParameters

+ 44 - 0
hackathon_starter/hackathon/scripts/yelp.py

@@ -0,0 +1,44 @@
+# pylint: disable=invalid-name
+
+'''
+Yelp.py contains methods for
+authenticating the user and
+retrieving data from Yelp's API.
+'''
+
+import simplejson as json
+import oauth2
+import requests
+
+# OAuth credential placeholders that must be filled in by users.
+CONSUMER_KEY = 'EXMisJNWez_PuR5pr06hyQ'
+CONSUMER_SECRET = 'VCK-4cDjtQ9Ra4HC5ltClNiJFXs'
+TOKEN = 'AWYVs7Vim7mwYyT1BLJA2xhNTs_vXLYS'
+TOKEN_SECRET = 'Rv4GrlYxYGhxUs14s0VBfk7JLJY'
+
+def requestData(location):
+    '''
+    Authenticates a request and returns
+    data from Yelp API.
+    '''
+    data = []
+    url = 'http://api.yelp.com/v2/business/' + location + '?'
+
+    consumer = oauth2.Consumer(CONSUMER_KEY, CONSUMER_SECRET)
+    oauth_request = oauth2.Request(method="GET", url=url)
+
+    oauth_request.update(
+        {
+            'oauth_nonce': oauth2.generate_nonce(),
+            'oauth_timestamp': oauth2.generate_timestamp(),
+            'oauth_token': TOKEN,
+            'oauth_consumer_key': CONSUMER_KEY
+        }
+    )
+    token = oauth2.Token(TOKEN, TOKEN_SECRET)
+    oauth_request.sign_request(oauth2.SignatureMethod_HMAC_SHA1(), consumer, token)
+    signed_url = oauth_request.to_url()
+    req = requests.get(signed_url)
+    content = json.loads(req.content)
+    data.append(content)
+    return data

+ 9 - 0
hackathon_starter/hackathon/serializers.py

@@ -0,0 +1,9 @@
+from django.forms import widgets
+from rest_framework import serializers
+from hackathon.models import Snippet
+
+
+class SnippetSerializer(serializers.ModelSerializer):
+    class Meta:
+        model = Snippet
+        fields = ('id', 'title', 'code', 'linenos')

+ 26 - 0
hackathon_starter/hackathon/static/css/form.css

@@ -0,0 +1,26 @@
+
+div.well{
+  height: 250px;
+} 
+
+.Absolute-Center {
+  margin: auto;
+  position: absolute;
+  top: 0; left: 0; bottom: 0; right: 0;
+}
+
+.Absolute-Center.is-Responsive {
+  width: 50%; 
+  height: 50%;
+  min-width: 200px;
+  max-width: 400px;
+  padding: 40px;
+}
+
+#logo-container{
+  margin: auto;
+  margin-bottom: 10px;
+  width:200px;
+  height:30px;
+  background-image:url('http://placehold.it/200x30/000000/ffffff/&text=Django+Hackathon+Starter');
+}

BIN=BIN
hackathon_starter/hackathon/static/img/github.png


BIN=BIN
hackathon_starter/hackathon/static/img/linkedin.jpg


BIN=BIN
hackathon_starter/hackathon/static/img/steam.png


BIN=BIN
hackathon_starter/hackathon/static/img/tumblr.png


+ 23 - 0
hackathon_starter/hackathon/templates/hackathon/api_examples.html

@@ -0,0 +1,23 @@
+<html>
+{% include 'hackathon/base.html' %}
+<body>
+
+
+	<div class="row text-center">
+	    <div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/githubUser/">Github Example</a></div>
+	    <div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/steam/">Steam Example</a></div>
+	    <div class="col-sm-4"><a href={{tumblr_url}}>Tumblr Example</a></div>
+		<div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/linkedin/">LinkedIn Example</a></div>
+		<div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/twilio/">Twilio Example</a></div>
+		<div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/instagram/">Instagram Example</a></div>
+		<div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/twitter/">Twitter Example</a></div>
+		<div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/twitterTweets/">Twitter Tweet Example</a></div>
+		<div class="col-sm-4"><a href="http://localhost:8000/hackathon/quandlstocks/">Quandl Example</a></div>
+		<div class="col-sm-4"><a href="http://localhost:8000/hackathon/meetupUser/">Meetup</a></div>
+		<div class="col-sm-4"><a href="http://localhost:8000/hackathon/yelp/">Yelp</a></div>
+		<div class="col-sm-4"><a href="http://127.0.0.1:8000/hackathon/nytimesarticles/">New York Times</a></div>
+
+  	</div>
+
+</body>
+</html>

+ 61 - 0
hackathon_starter/hackathon/templates/hackathon/base.html

@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <title> Django Hackathon Starter </title>
+    <script src="/static/bower_components/jquery/dist/jquery.js"></script>
+    <script type="text/javascript" src="/static/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
+    <script type="text/javascript" src="/static/bower_components/d3/d3.min.js"></script>
+    
+    <link rel="stylesheet" href="/static/bower_components/bootstrap/dist/css/bootstrap.min.css">
+    <link rel="stylesheet" href="/static/bower_components/bootstrap/dist/css/bootstrap-theme.min.css">
+    <link rel="stylesheet" href="/static/bower_components/bootstrap-social/bootstrap-social.css">
+    <link rel="stylesheet" href="/static/bower_components/font-awesome/css/font-awesome.min.css">
+
+  </head>
+    
+  <body>
+    <nav class="navbar navbar-default" role="navigation">
+      <div class="container-fluid">
+        <!-- Brand and toggle get grouped for better mobile display -->
+        <div class="navbar-header">
+          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a class="navbar-brand" href="/hackathon">Django Hackathon Starter</a>
+      </div>
+
+      <!-- Collect the nav links, forms, and other content for toggling -->
+      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+        <ul class="nav navbar-nav navbar-left">
+          {% if user.is_authenticated %}
+          <li><a href="/hackathon/api">API</a></li>
+          {% endif %}
+        </ul>
+        <ul class="nav navbar-nav navbar-right">
+          {% if not user.is_authenticated %}
+            <li class="active"><a href="/hackathon/register">Register <span class="sr-only">(current)</span></a></li>
+            
+            <li><a href="/hackathon/login">Login</a></li>
+          {% endif %}
+            
+        </ul>
+        
+        <ul  class="nav navbar-nav navbar-right">
+          {% if user.is_authenticated %}
+    
+            <li><a>Hello {{user}}</a></li>
+            <li><a href="/hackathon/logout/">Logout</a></li>
+          {% endif %}
+        </ul>
+          
+          
+          </li>
+         </ul>
+        </div><!-- /.navbar-collapse -->
+      </div><!-- /.container-fluid -->
+    </nav>
+  </body>
+</html>

+ 109 - 0
hackathon_starter/hackathon/templates/hackathon/facebook.html

@@ -0,0 +1,109 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Facebook Login JavaScript Example</title>
+<meta charset="UTF-8">
+</head>
+<body>
+{% include 'hackathon/base.html' %}
+<script>
+  // This is called with the results from from FB.getLoginStatus().
+  function statusChangeCallback(response) {
+    console.log('statusChangeCallback');
+    console.log(response);
+    // The response object is returned with a status field that lets the
+    // app know the current login status of the person.
+    // for FB.getLoginStatus().
+    if (response.status === 'connected') {
+      // Logged into your app and Facebook.
+      testAPI();
+    } else if (response.status === 'not_authorized') {
+      // The person is logged into Facebook, but not your app.
+      document.getElementById('status').innerHTML = 'Please log ' +
+        'into this app.';
+    } else {
+      // The person is not logged into Facebook, so we're not sure if
+      // they are logged into this app or not.
+      document.getElementById('status').innerHTML = 'Please log ' +
+        'into Facebook.';
+    }
+  }
+
+  // This function is called when someone finishes with the Login
+  // Button.  See the onlogin handler attached to it in the sample
+  // code below.
+  function checkLoginState() {
+    FB.getLoginStatus(function(response) {
+      statusChangeCallback(response);
+    });
+  }
+
+  window.fbAsyncInit = function() {
+  FB.init({
+    appId      : {{yourappid}},
+    cookie     : true, 
+                        
+    xfbml      : true,  // parse social plugins on this page
+    version    : 'v2.2' // use version 2.2
+  });
+
+  FB.getLoginStatus(function(response) {
+    statusChangeCallback(response);
+  });
+
+  };
+
+  // Load the SDK asynchronously
+  (function(d, s, id) {
+    var js, fjs = d.getElementsByTagName(s)[0];
+    if (d.getElementById(id)) return;
+    js = d.createElement(s); js.id = id;
+    js.src = "//connect.facebook.net/en_US/sdk.js";
+    fjs.parentNode.insertBefore(js, fjs);
+  }(document, 'script', 'facebook-jssdk'));
+
+  // Here we run a very simple test of the Graph API after login is
+  // successful.  See statusChangeCallback() for when this call is made.
+  function testAPI() {
+    console.log('Welcome!  Fetching your information.... ');
+    FB.api('/me', function(response) {
+      console.log('Successful login for: ' + response.name);
+      document.getElementById('status').innerHTML =
+        'Thanks for logging in, ' + response.name + '!';
+    });
+  }
+  // Here will be a function that'll create a dialog box to post upon your own wall. 
+  function posttoFeed() {
+    FB.ui({
+     method: 'Feed',
+     name: 'Django-Hackathon-Starter',
+     caption: 'starter dialog box',
+     description: 'This is a wall post brought to you by the Hackathon Starter',
+     message: 'It is alive!'
+    },
+    function(response){
+      if (response && response.post_id){
+        alert('post was published');
+      } else {
+        alert('post was not published');
+      }
+    });
+  }
+</script>
+
+<!--
+  Below we include the Login Button social plugin. This button uses
+  the JavaScript SDK to present a graphical Login button that triggers
+  the FB.login() function when clicked.
+-->
+
+<fb:login-button scope="public_profile,email" onlogin="checkLoginState();">
+</fb:login-button>
+
+<input type="button" onclick="posttoFeed()" value="Post to Feed" />
+
+<div id="status">
+</div>
+
+</body>
+</html>

+ 62 - 0
hackathon_starter/hackathon/templates/hackathon/github.html

@@ -0,0 +1,62 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+    <style>
+      .form-signin {
+        max-width: 550px;
+        padding: 15px;
+        margin: 0 auto;
+      }    
+    </style>
+
+    <h1 class="text-center"> Github User Data </h1>
+
+    <div class="container text-center">
+        <form class="form-signin" id="login_form" method="post" action="/hackathon/githubUser/">
+          {% csrf_token %}
+          {% load bootstrap %}
+          <br>
+          <input type="text" name="user" class="form-control" placeholder="Github User Name, e.g: DrkSephy" value="" required autofocus>
+          <br>
+          <button class="btn btn-lg btn-primary btn-block" type="submit">Get Data</button>
+          <input type="hidden" name="submit" value="submit" />
+        </form>
+    </div>
+
+    {% if data %}
+    	<div class="col-lg-12">
+            <div class="table-responsive">
+                <table class="table table-bordered table-hover table-striped tablesorter">
+                    <thead>
+                    <tr>
+                    <th class="header"> Username <i class="icon-sort"></i></th>
+                    <th class="header"> Blog <i class="icon-sort"></i></th>
+                    <th class="header"> Public Repos <i class="icon-sort"></i></th>
+                    <th class="header"> Public Gists <i class="icon-sort"></i></th>
+                    <th class="header"> Email <i class="icon-sort"></i></th>
+                    <th class="header"> Followers <i class="icon-sort"></i></th>
+                    <th class="header"> Following <i class="icon-sort"></i></th>
+                    </tr>
+                </thead>
+                <tbody>
+
+                {% for key in data.userData %}
+                    <tr>
+                        <td>{{ key.name }}</td>
+                        <td>{{ key.blog }}</td>
+                        <td>{{ key.public_repos }}</td>
+                        <td>{{ key.public_gists }}</td>
+                        <td>{{ key.email }}</td>
+                        <td>{{ key.followers }}</td>
+                        <td>{{ key.following }}</td>
+        			</tr>
+                {% endfor %}
+
+                </tbody>
+                </table>
+            </div>
+        </div>
+    {% endif %}
+</body>
+</html>

+ 110 - 0
hackathon_starter/hackathon/templates/hackathon/githubResume.html

@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+
+    <h1 class="text-center"> Github Resume </h1>
+	<div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                <tr>
+                <th class="header"> Username <i class="icon-sort"></i></th>
+                <th class="header"> Blog <i class="icon-sort"></i></th>
+                <th class="header"> Public Repos <i class="icon-sort"></i></th>
+                <th class="header"> Public Gists <i class="icon-sort"></i></th>
+                <th class="header"> Email <i class="icon-sort"></i></th>
+                <th class="header"> Followers <i class="icon-sort"></i></th>
+                <th class="header"> Following <i class="icon-sort"></i></th>
+                </tr>
+            </thead>
+            <tbody>
+
+            {% for key in data.userData %}
+                <tr>
+                    <td>{{ key.name }}</td>
+                    <td>{{ key.blog }}</td>
+                    <td>{{ key.public_repos }}</td>
+                    <td>{{ key.public_gists }}</td>
+                    <td>{{ key.email }}</td>
+                    <td>{{ key.followers }}</td>
+                    <td>{{ key.following }}</td>
+    			</tr>
+            {% endfor %}
+
+            </tbody>
+            </table>
+        </div>
+    </div>
+
+    <div class="col-xs-4">
+        <h2> Top Contributed Repositories </h2>
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                <tr>
+                <th class="header"> Repository <i class="icon-sort"></i></th>
+                <th class="header"> Total <i class="icon-sort"></i></th>
+                </tr>
+            </thead>
+            <tbody>
+
+            {% for key in data.filteredData %}
+                <tr>
+                    <td>{{ key.repo_name }}</td>
+                    <td>{{ key.total }}</td>
+                </tr>
+            {% endfor %}
+
+            </tbody>
+            </table>
+        </div>
+    </div>
+    <div class="col-xs-4">
+        <h2> Top Starred Repositories </h2>
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                <tr>
+                <th class="header"> Repository <i class="icon-sort"></i></th>
+                <th class="header"> Count <i class="icon-sort"></i></th>
+                </tr>
+            </thead>
+            <tbody>
+
+            {% for key in data.filteredStargazers %}
+                <tr>
+                    <td>{{ key.name }}</td>
+                    <td>{{ key.stargazers_count }}</td>
+                </tr>
+            {% endfor %}
+
+            </tbody>
+            </table>
+        </div>
+    </div>
+
+    <div class="col-xs-4">
+        <h2> Contributions </h2>
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                <tr>
+                <th class="header"> Repository <i class="icon-sort"></i></th>
+                </tr>
+            </thead>
+            <tbody>
+
+            {% for key in data.forkedRepos %}
+                <tr>
+                    <td>{{ key.name }}</td>
+                </tr>
+            {% endfor %}
+
+            </tbody>
+            </table>
+        </div>
+    </div>
+
+</body>
+</html>

+ 51 - 0
hackathon_starter/hackathon/templates/hackathon/githubTopRepositories.html

@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+    <style>
+      .form-signin {
+        max-width: 550px;
+        padding: 15px;
+        margin: 0 auto;
+      }    
+    </style>
+
+    <h1 class="text-center"> Github Top Repositories </h1>
+
+    <div class="container text-center">
+        <form class="form-signin" id="login_form" method="post" action="/hackathon/githubTopRepositories/">
+          {% csrf_token %}
+          {% load bootstrap %}
+          <br>
+          <input type="text" name="user" class="form-control" placeholder="Github User Name, e.g: DrkSephy" value="" required autofocus>
+          <br>
+          <button class="btn btn-lg btn-primary btn-block" type="submit">Get Top Contributions </button>
+          <input type="hidden" name="submit" value="submit" />
+        </form>
+    </div>
+	
+        <div class="col-lg-12">
+            <div class="table-responsive">
+                <table class="table table-bordered table-hover table-striped tablesorter">
+                    <thead>
+                    <tr>
+                    <th class="header"> Repository <i class="icon-sort"></i></th>
+                    <th class="header"> Total <i class="icon-sort"></i></th>
+                    </tr>
+                </thead>
+                <tbody>
+
+                {% for key in data.committed %}
+                    <tr>
+                        <td>{{ key.repo_name }}</td>
+                        <td>{{ key.total }}</td>
+                    </tr>
+                {% endfor %}
+
+                </tbody>
+                </table>
+            </div>
+        </div>
+
+</body>
+</html>

+ 14 - 0
hackathon_starter/hackathon/templates/hackathon/index.html

@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+
+<html>
+    {% include 'hackathon/base.html' %}
+
+    <body>
+    	{% if user.is_authenticated %}
+        	<h1>Api Example</h1>
+        	<strong>{{ boldmessage }}</strong><br />
+        {% else %}
+        	<h1> Please register/login! </h1>
+        {% endif %}
+    </body>
+</html>

+ 30 - 0
hackathon_starter/hackathon/templates/hackathon/instagram.html

@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+	<h1 class="text-center"> {{ title }}</h1> 
+	<br>
+
+	<div class="container text-center">
+		<form class="form-inline" method='get' action="/hackathon/instagram/">
+		  <div class="form-group">
+		    <input type="text" name="instagram_tag" class="form-control" placeholder="Input tag, e.g: kitten">
+		  </div>
+		  <button type="submit" class="btn btn-default">Search</button>
+		</form>
+	</div>
+	<br>
+
+	{% if tagged_media %}
+	<div class="col-lg-12">
+		<div class="table-responsive">
+			<h2> #{{search_tag}} </h2>
+			<table class="table">
+				{% for i in tagged_media %}
+					<img src="{{i.images.thumbnail.url}}">
+				{% endfor %}
+			</table>
+		</div>
+	</div>	
+	{% endif %}
+</html>

+ 39 - 0
hackathon_starter/hackathon/templates/hackathon/instagram_q.html

@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+	<h1 class="text-center"> {{ title }}</h1> 
+	<br>
+	<div class="container text-center">
+		<form class="form-inline" method='get' action="/hackathon/instagramMediaByLocation/">
+		  <div class="form-group">
+		    <input type="text" name="address_field" class="form-control" placeholder="address">
+		  </div>
+		  <button type="submit" class="btn btn-default">Search</button>
+		</form>
+	</div>
+	<div class="col-lg-12">
+		<br>
+		<p class="text-center">{{err_msg}}</p>
+	</div>
+
+	{% if geocode_result %}	
+	<div class="col-lg-12">
+		<div class="table-responsive">
+			<h4 class="text-center"> Latitude: {{geocode_result.lat}} </h3>
+			<h4 class="text-center"> Longitude: {{geocode_result.lng}} </h3>
+
+			<p class="text-center"> {{list_id}} </p>
+			<table class="table">
+				{% for list in media %}
+					{% for user in list %}
+						<a href="{{user.link}}" title="{{user.created_time}}"><img src="{{user.images.thumbnail.url}}"></a>
+					{% endfor %}
+				{% endfor %}
+
+			</table>
+		</div>
+	</div>
+	{% endif %}
+
+</html>

+ 44 - 0
hackathon_starter/hackathon/templates/hackathon/linkedin.html

@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+	<h1 class="text-center"> {{ title }}</h1>
+	<br>
+	<div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+	                <tr>
+	                <th class="header"> First Name <i class="icon-sort"></i></th>
+	                <th class="header"> Skills <i class="icon-sort"></i></th>
+	                <th class="header"> Education <i class="icon-sort"></i></th>
+	                </tr>
+            	</thead>
+            	<tbody>
+	                <tr>
+	                    <td>{{ content.firstName }}</td> 
+	                    <td>
+	                    	{% if content.skills %}
+	                    		{% for i in content.skills.values %}
+	                    			{{i.skill.name}} 
+	                    		{% endfor %}
+	                    	{% else %}
+	                    		None
+	                    	{% endif %}
+	                    </td>
+	                    <td>
+	                    	{% if content.educations %}
+	                    		{% for i in content.educations.values %}
+	                    			<strong>{{i.schoolName }}</strong> [{{i.degree}}, {{i.fieldOfStudy}}] ({{i.startDate.year}} - {{i.endDate.year}})
+	                    		{% endfor %}
+	                    	{% else %}
+	                    		None
+	                    	{% endif %}
+	                    </td>
+	                </tr>
+            	</tbody>
+            </table>
+        </div>
+	</div>
+</body>
+</html>

+ 51 - 0
hackathon_starter/hackathon/templates/hackathon/login.html

@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+    {% include 'hackathon/base.html' %}
+    <style>
+      .form-signin {
+        max-width: 550px;
+        padding: 15px;
+        margin: 0 auto;
+      }    
+    </style>
+
+    <body>
+      <div class="container text-center">
+        <form class="form-signin" id="login_form" method="post" action="/hackathon/login/">
+          {% csrf_token %}
+          {% load bootstrap %}
+          <h2 class="form-signin-heading">Login</h2>
+          <br>
+          <input type="text" name="username" class="form-control" placeholder="Username" value="" required autofocus>
+          <br>
+          <input type="password" name="password" class="form-control" placeholder="Password" value=""required>
+          <br>
+          <button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>
+          <input type="hidden" name="submit" value="submit" />
+        </form>
+      </div>
+
+      <div class="form-signin">          
+        <a class="btn btn-block btn-social btn-twitter" href="http://127.0.0.1:8000/hackathon/twitter_login/">
+          <i class="fa fa-twitter"></i>
+          Sign in with Twitter
+        </a>
+        <a class="btn btn-block btn-social btn-instagram" href="http://localhost:8000/hackathon/instagram_login/">
+          <i class="fa fa-instagram"></i>
+          Sign in with Instagram
+        </a>
+        <a class="btn btn-block btn-social btn-tumblr" href="http://localhost:8000/hackathon/tumblr_login/">
+          <i class="fa fa-tumblr"></i>
+          Sign in with Tumblr
+        </a>
+        <a class="btn btn-block btn-social btn-github" href="http://localhost:8000/hackathon/github_login/">
+          <i class="fa fa-github"></i>
+          Sign in with Github
+        </a>
+        <a class="btn btn-block btn-social btn-linkedin" href="http://localhost:8000/hackathon/linkedin_login/">
+          <i class="fa fa-linkedin"></i>
+          Sign in with LinkedIn
+        </a> 
+      </div>
+    </body>
+</html>

+ 36 - 0
hackathon_starter/hackathon/templates/hackathon/meetup.html

@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+
+    <h1 class="text-center"> Meetup Profile </h1>
+	<div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                <tr>
+                <th class="header"> Name <i class="icon-sort"></i></th>
+                <th class="header"> State <i class="icon-sort"></i></th>
+                <th class="header"> City <i class="icon-sort"></i></th>
+                <th class="header"> Country <i class="icon-sort"></i></th>
+                <th class="header"> Status <i class="icon-sort"></i></th>
+                </tr>
+            </thead>
+            <tbody>
+
+            {% for key in data.userData %}
+                <tr>
+                    <td>{{ key.name }}</td>
+                    <td>{{ key.state }}</td>
+                    <td>{{ key.city }}</td>
+                    <td>{{ key.country }}</td>
+                    <td>{{ key.status }}</td>
+    			</tr>
+            {% endfor %}
+
+            </tbody>
+            </table>
+        </div>
+    </div>
+</body>
+</html>

+ 40 - 0
hackathon_starter/hackathon/templates/hackathon/navbar.html

@@ -0,0 +1,40 @@
+<body>
+  <nav class="navbar navbar-default" role="navigation">
+      <div class="container-fluid">
+        <!-- Brand and toggle get grouped for better mobile display -->
+        <div class="navbar-header">
+          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a class="navbar-brand" href="#">Django Hackathon Starter</a>
+      </div>
+
+      <!-- Collect the nav links, forms, and other content for toggling -->
+      <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+        <ul class="nav navbar-nav navbar-right">
+          {% if not user.is_authenticated %}
+            <li class="active"><a href="/hackathon/register">Register <span class="sr-only">(current)</span></a></li>
+            
+            <li><a href="/hackathon/login">Login</a></li>
+          {% endif %}
+            
+        </ul>
+        
+        <ul  class="nav navbar-nav navbar-right">
+          {% if user.is_authenticated %}
+    
+            <li><a>Hello {{user}}</a></li>
+            <li><a href="/hackathon/logout/">Logout</a></li>
+          {% endif %}
+        </ul>
+          
+          
+          </li>
+        </ul>
+      </div><!-- /.navbar-collapse -->
+    </div><!-- /.container-fluid -->
+  </nav>
+</body>

+ 61 - 0
hackathon_starter/hackathon/templates/hackathon/nytimes.html

@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+
+    <h1 class="text-center"> New York Times Collection </h1>
+    <h2 class="text-center"> Popular Stories Data </h2>
+	<div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                <tr>
+                <th class="header"> Title <i class="icon-sort"></i></th>
+                <th class="header"> Abstract <i class="icon-sort"></i></th>
+                <th class="header"> Section Located <i class="icon-sort"></i></th>
+                <th class="header"> Author <i class="icon-sort"></i></th>  
+                </tr>
+            </thead>
+            <tbody>
+
+            {% for data in everyData.pop %}
+                <tr>
+                    <td>{{ data.title }}</td>
+                    <td>{{ data.abstract }}</td>
+                    <td>{{ data.section }}</td>
+                    <td>{{ data.byline }}</td>
+                </tr>
+            {% endfor %}
+            </tbody>
+            </table>
+        </div>
+    </div>
+    <h2 class="text-center"> Top Stories Data </h2>
+    <div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                <tr>
+                <th class="header"> Title <i class="icon-sort"></i></th>
+                <th class="header"> Abstract <i class="icon-sort"></i></th>
+                <th class="header"> Section Located <i class="icon-sort"></i></th>
+                <th class="header"> Author <i class="icon-sort"></i></th>  
+                </tr>
+            </thead>
+            <tbody>
+
+            {% for data in everyData.top %}
+                <tr>
+                    <td>{{ data.title }}</td>
+                    <td>{{ data.abstract }}</td>
+                    <td>{{ data.section }}</td>
+                    <td>{{ data.byline }}</td>
+                </tr>
+            {% endfor %}
+            </tbody>
+            </table>
+        </div>
+    </div>
+  
+</body>
+</html>

+ 87 - 0
hackathon_starter/hackathon/templates/hackathon/quandl.html

@@ -0,0 +1,87 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+
+    <h1 class="text-center"> Quandl Collection </h1>
+    <h2 class="text-center"> Dow Jones Data </h2>
+	<div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                <tr>
+                <th class="header"> Name <i class="icon-sort"></i></th>
+                <th class="header"> Description <i class="icon-sort"></i></th>
+                <th class="header"> Data <i class="icon-sort"></i></th>
+                <th class="header"> Code <i class="icon-sort"></i></th>  
+                </tr>
+            </thead>
+            <tbody>
+
+            {% for data in everyData.dow %}
+                <tr>
+                    <td>{{ data.name }}</td>
+                    <td>{{ data.description }}</td>
+                    <td>{{ data.data }}</td>
+                    <td>{{ data.code }}</td>
+                </tr>
+            {% endfor %}
+            </tbody>
+            </table>
+        </div>
+    </div>
+    <h2 class="text-center"> SnP 500 Data </h2>
+    <div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                <tr>
+                <th class="header"> Name <i class="icon-sort"></i></th>
+                <th class="header"> Description <i class="icon-sort"></i></th>
+                <th class="header"> Data <i class="icon-sort"></i></th>
+                <th class="header"> Code <i class="icon-sort"></i></th>  
+                </tr>
+            </thead>
+            <tbody>
+
+            {% for data in everyData.snp %}
+                <tr>
+                    <td>{{ data.name }}</td>
+                    <td>{{ data.description }}</td>
+                    <td>{{ data.data }}</td>
+                    <td>{{ data.code }}</td>
+                </tr>
+            {% endfor %}
+            </tbody>
+            </table>
+        </div>
+    </div>
+    <h2 class="text-center"> Nasdaq Data </h2>
+    <div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                <tr>
+                <th class="header"> Name <i class="icon-sort"></i></th>
+                <th class="header"> Description <i class="icon-sort"></i></th>
+                <th class="header"> Data <i class="icon-sort"></i></th>
+                <th class="header"> Code <i class="icon-sort"></i></th>  
+                </tr>
+            </thead>
+            <tbody>
+
+            {% for data in everyData.nasdaq %}
+                <tr>
+                    <td>{{ data.name }}</td>
+                    <td>{{ data.description }}</td>
+                    <td>{{ data.data }}</td>
+                    <td>{{ data.code }}</td>
+                </tr>
+            {% endfor %}
+            </tbody>
+            </table>
+        </div>
+    </div>
+        
+</body>
+</html>

+ 42 - 0
hackathon_starter/hackathon/templates/hackathon/register.html

@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+    {% include 'hackathon/base.html' %}
+    <link rel="stylesheet" href="/static/css/form.css">
+    <body>
+        {% if registered %}
+          <strong>Thank you for registering!</strong>
+          <a href="/hackathon/">Return to the homepage.</a><br />
+        
+        {% else %}
+          <div class='container text-center'>
+              <h2 class="form-signin-heading">Sign Up</h2>
+              <br>
+              <form class="form-horizontal" id="user_form" method="post" action="/hackathon/register/"
+                enctype="multipart/form-data">
+                {% csrf_token %}
+                {% load bootstrap %} 
+
+                <table>
+                  <tr>
+                     
+                      <td class="container text-center">{{ user_form.username | bootstrap_horizontal}}</td>
+                  </tr>
+
+                  <tr>
+                     
+                      <td class="container text-center">{{ user_form.email | bootstrap_horizontal}}</td>
+                  </tr>
+
+                  <tr>
+                     
+                      <td class="container text-center">{{ user_form.password | bootstrap_horizontal}}</td>
+                  </tr>
+                </table>
+                <button class="btn btn-lg btn-primary" type="submit">Register</button>
+                <input type="hidden" name="submit" value="Register" />
+              </form>
+            </div>
+          {% endif %}
+    </body>
+</html>
+

+ 31 - 0
hackathon_starter/hackathon/templates/hackathon/steam.html

@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+
+	<h1 class="text-center"> Steam API </h1>
+		<div class="col-lg-12">
+	        <div class="table-responsive">
+	            <table class="table table-bordered table-hover table-striped tablesorter">
+	                <thead>
+	                <tr>
+	                <th class="header"> Game ID <i class="icon-sort"></i></th>
+	                <th class="header"> Game Name <i class="icon-sort"></i></th>
+	                <th class="header"> Minutes Played <i class="icon-sort"></i></th>
+	            </thead>
+	            <tbody>
+
+	            {% for game in game %}
+	                <tr>
+	                    <td>{{ game.appid }}</td>
+	                    <td>{{ game.name }}</td>
+	                    <td>{{ game.playtime_forever }}</td>
+	    			</tr>
+	            {% endfor %}
+
+	            </tbody>
+	            </table>
+	        </div>
+	    </div>
+</body>
+</html>

+ 60 - 0
hackathon_starter/hackathon/templates/hackathon/tumblr.html

@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+	<h1 class="text-center"> {{ title }}</h1> 
+	<br>	
+	<div class="col-lg-12">
+		<div class="table-responsive">
+			<h2> BLOGGER </h2>
+			<table class="table table-bordered">
+				<tr>
+					<th>Name</th>
+					<td>{{blogData.name}}</td>
+				</tr>
+				<tr>
+					<th>Posts</th>
+					<td>{{blogData.posts}}</td>				
+				</tr>
+				<tr>
+					<th>Blog title</th>
+					<td>{{blogData.title}}</td>				
+				</tr>
+				<tr>
+					<th>Last updated</th>
+					<td>{{blogData.updated}}</td>				
+				</tr>
+				<tr>
+					<th>Description</th>
+					<td>{{blogData.description}}</td>				
+				</tr>				
+			</table>
+		</div>
+	</div>
+
+	<div class="col-md-4">
+		<div class="table-responsive">
+			<h2> #starbucks </h2>
+			<table class="table table-bordered">
+				{% for i in blogTag %}
+				<tr>
+					<td> {{i}} </td>
+				</tr>
+				{% endfor %}		
+			</table>
+		</div>
+	</div>
+
+	<div class="col-md-4">
+		<div class="table-responsive">
+			<h2> Comments </h2>
+			<table class="table table-bordered">
+				{% for i in blogontag %}
+				<tr>
+					<td> {{i}} </td>
+				</tr>
+				{% endfor %}		
+			</table>
+		</div>
+	</div>
+</html>

+ 31 - 0
hackathon_starter/hackathon/templates/hackathon/twilio.html

@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html>
+    {% include 'hackathon/base.html' %}
+    <style>
+      .form-signin {
+        max-width: 550px;
+        padding: 15px;
+        margin: 0 auto;
+      }    
+    </style>
+
+    <body>
+
+      {{ context }}
+      <h1 class="text-center"> Twilio Messages </h1>
+      <div class="container text-center">
+        <form class="form-signin" id="login_form" method="post" action="/hackathon/twilio/">
+          {% csrf_token %}
+          {% load bootstrap %}
+          <br>
+          <input type="text" name="number" class="form-control" placeholder="Phone Number - e.g: +13473282978" value="" required autofocus>
+          <br>
+          <input type="text" name="message" class="form-control" placeholder="Message - e.g: Hello World!" value="" required>
+          <br>
+          <button class="btn btn-lg btn-primary btn-block" type="submit">Send Message</button>
+          <input type="hidden" name="submit" value="submit" />
+        </form>
+      </div>
+
+    </body>
+</html>

+ 45 - 0
hackathon_starter/hackathon/templates/hackathon/twitter.html

@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+<body>
+	{% include 'hackathon/base.html' %}
+	<h1 class="text-center"> {{ title }}</h1> 
+
+	<div class="col-lg-12">
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                <tr>
+                <th class="header"> Name <i class="icon-sort"></i></th>
+                <th class="header"> Woeid <i class="icon-sort"></i></th>
+                <th class="header"> Place type <i class="icon-sort"></i></th>
+                <th class="header"> Country <i class="icon-sort"></i></th>
+                <th class="header"> Country Code <i class="icon-sort"></i></th>
+                <th class="header"> ParentID <i class="icon-sort"></i></th>
+                <th class="header"> Neighbor <i class="icon-sort"></i></th>
+                </tr>
+            </thead>
+            <tbody>
+            {% for item in value %}
+                <tr>
+                    <td>{{ item.name }}</td> 
+                    <td>{{ item.woeid }}</td>
+                    <td>{{ item.placeType.name}}</td>
+                    <td>{{ item.country}}</td>
+                    <td>{{ item.countryCode}}</td>
+                    <td>{{ item.parentid}}</td>
+                    {% if item.neighbor %}
+                        <td>
+                            {% for v in item.neighbor.places.place %}
+                                {{ v.name }},
+                            {% endfor %}
+                        </td>
+                    {% else %}
+                        <td>No available Data.</td>
+                    {% endif %}
+            {% endfor %}
+            </tbody>
+            </table>
+        </div>
+    </div>
+
+</html>

+ 60 - 0
hackathon_starter/hackathon/templates/hackathon/twitter_tweet.html

@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style type="text/css">
+        .slice text {
+            font-size: 16pt;
+            font-family: Arial;
+        }   
+    </style>
+</head>
+<body>
+    {% include 'hackathon/base.html' %}
+    <h1 class="text-center"> {{ title }}</h1>
+    <br>
+
+    <div class="container text-center">
+        <form class="form-inline" method='get' action="/hackathon/twitterTweets/">
+          <div class="form-group">
+            <input type="text" name="tweets" class="form-control" placeholder="Input tweet, e.g: mayfield">
+          </div>
+          <button type="submit" class="btn btn-default">Search</button>
+        </form>
+    </div>
+    <br>
+
+    {% if content %}
+    <div class="col-lg-12">      
+        <div class="table-responsive">
+            <table class="table table-bordered table-hover table-striped tablesorter">
+                <thead>
+                    <tr>
+                    <th class="header"> Who <i class="icon-sort"></i></th>
+                    <th class="header"> Tweet <i class="icon-sort"></i></th>
+                    <th class="header"> Retweets <i class="icon-sort"></i></th>
+                    <th class="header"> Created <i class="icon-sort"></i></th>
+
+                    </tr>
+                </thead>
+                <tbody>
+                {% for item in content %}
+                    <tr>
+                        <td>{{ item.user.screen_name }}</td> 
+                        <td>{{ item.text }}</td>
+                        <td>{{ item.retweet_count}}</td>
+                        <td>{{ item.created_at}}</td>
+                {% endfor %}
+                </tbody>
+            </table>
+        </div>
+    </div>
+    {{data}}
+    <script type="text/javascript">
+        var width = 300,
+        height = 300,
+        radius =100, 
+        color = d3.scale.category20c();
+    </script>
+    {% endif %}
+</body>
+</html>

+ 58 - 0
hackathon_starter/hackathon/templates/hackathon/yelp.html

@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<html>
+    {% include 'hackathon/base.html' %}
+    <style>
+      .form-signin {
+        max-width: 550px;
+        padding: 15px;
+        margin: 0 auto;
+      }    
+    </style>
+
+    <body>
+      <h1 class="text-center"> Yelp API </h1>
+      <div class="container text-center">
+        <form class="form-signin" id="login_form" method="post" action="/hackathon/yelp/">
+          {% csrf_token %}
+          {% load bootstrap %}
+          <br>
+          <input type="text" name="location" class="form-control" placeholder="Enter a location, e.g: yelp-san-francisco" value="" required autofocus>
+          <br>
+          <button class="btn btn-lg btn-primary btn-block" type="submit">Search</button>
+          <input type="hidden" name="submit" value="submit" />
+        </form>
+      </div>
+
+      	{% if data %}
+	      <div class="col-lg-12">
+	        <div class="table-responsive">
+	            <table class="table table-bordered table-hover table-striped tablesorter">
+	                <thead>
+	                <tr>
+	                <th class="header"> Name <i class="icon-sort"></i></th>
+	                <th class="header"> Snippet Text <i class="icon-sort"></i></th>
+	                <th class="header"> Open? <i class="icon-sort"></i></th>
+	                <th class="header"> Review Count <i class="icon-sort"></i></th>
+	                <th class="header"> URL <i class="icon-sort"></i></th>
+	                </tr>
+	            </thead>
+	            <tbody>
+
+	            {% for key in data %}
+	                <tr>
+	                    <td>{{ key.name }}</td>
+	                    <td>{{ key.snippet_text }}</td>
+	                    <td>{{ key.is_closed }}</td>
+	                    <td>{{ key.review_count }}</td>
+	                    <td>{{ key.url |urlize }}</td>
+	    			</tr>
+	            {% endfor %}
+
+	            </tbody>
+	            </table>
+	        </div>
+	      </div>
+	    {% endif %}
+
+    </body>
+</html>

+ 135 - 0
hackathon_starter/hackathon/tests.py

@@ -0,0 +1,135 @@
+from django.test import TestCase
+from django.test import Client
+
+class SteamViewTestCase(TestCase):
+	def testSteam(self):
+		resp = self.client.get('/hackathon/steam/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testSteamDiscountedGames(self):
+		resp = self.client.get('/hackathon/steamDiscountedGames/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testSteamPlaytimeForever(self):
+		resp = self.client.get('/hackathon/steam/')
+		for dict in resp.context:
+			if 'playtime_forever' in dict:
+				self.assertTrue('playtime_forever' in dict)
+
+	def testSteamName(self):
+		resp = self.client.get('/hackathon/steam/')
+		for dict in resp.context:
+			if 'name' in dict:
+				self.assertTrue('name' in dict)
+
+	def testSteamImg(self):
+		resp = self.client.get('/hackathon/steam/')
+		for dict in resp.context:
+			if 'img_logo_url' in dict:
+				self.assertTrue('img_logo_url' in dict)
+
+	def testSteamAppID(self):
+		resp = self.client.get('/hackathon/steam/')
+		for dict in resp.context:
+			if 'appid' in dict:
+				self.assertTrue('appid' in dict)
+
+	def testSteamDiscountedGamesDiscount(self):
+		resp = self.client.get('/hackathon/steamDiscountedGames/')
+		self.assertEqual(resp.context, None)
+
+
+class HackathonViewsTestCase(TestCase):
+	def testIndex(self):
+		resp = self.client.get('/hackathon/api/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testQuandlDowJones(self):
+		resp = self.client.get('/hackathon/quandlDowJones/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testQuandlSnp500(self):
+		resp = self.client.get('/hackathon/quandlSnp500/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testQuandlNasdaq(self):
+		resp = self.client.get('/hackathon/quandlNasdaq/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testGithubUser(self):
+		resp = self.client.get('/hackathon/githubUser/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testGithubTopRepositories(self):
+		resp = self.client.get('/hackathon/githubTopRepositories/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testGithubResume(self):
+		resp = self.client.get('/hackathon/githubResume/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testNytimespop(self):
+		resp = self.client.get('/hackathon/nytimespop/')
+		self.assertEqual(resp.status_code, 200)
+
+class YelpTestCase(TestCase):
+	def testYelpPost(self):
+		resp = self.client.post('/hackathon/yelp/', {'location': 'yelp-san-francisco'})
+		self.assertEqual(resp.status_code, 200)
+
+	def testYelpContent(self):
+		resp = self.client.post('/hackathon/yelp/', {'location': 'yelp-san-francisco'})
+		self.assertNotEqual(resp.content, '')
+
+	def testYelpContentNotNone(self):
+		resp = self.client.post('/hackathon/yelp/', {'location': 'yelp-san-francisco'})
+		self.assertIsNotNone(resp.content)
+
+	def testGetYelpPage(self):
+		resp = self.client.get('/hackathon/yelp')
+		self.assertEqual(resp.status_code, 301)
+
+class ScraperTestCase(TestCase):
+	def testScraperPage(self):
+		resp = self.client.get('/hackathon/steamDiscountedGames/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testScraperContent(self):
+		resp = self.client.get('/hackathon/steamDiscountedGames/')
+		self.assertNotEqual(resp.content, '')
+
+class TwilioTestCase(TestCase):
+	def testTwilio(self):
+		resp = self.client.get('/hackathon/twilio/')
+		self.assertEqual(resp.status_code, 200)
+
+	#def testMessage(self):
+	#	resp = self.client.post('/hackathon/twilio/', {'number': '+13473282978', 'message': 'hello world'})
+	#	self.assertEqual(resp.status_code, 302)
+
+class NewYorkTimesTestCase(TestCase):
+	def testPopularArticles(self):
+		resp = self.client.get('/hackathon/nytimespop/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testPopularArticlesContent(self):
+		resp = self.client.get('/hackathon/nytimespop/')
+		self.assertNotEqual(resp.content, '')
+
+	def testTopArticles(self):
+		resp = self.client.get('/hackathon/nytimestop/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testTopArticlesContent(self):
+		resp = self.client.get('/hackathon/nytimestop/')
+		self.assertNotEqual(resp.content, '')
+
+	def testNewYorkTimesArticles(self):
+		resp = self.client.get('/hackathon/nytimesarticles/')
+		self.assertEqual(resp.status_code, 200)
+
+	def testNewYorkTimesArticlesContent(self):
+		resp = self.client.get('/hackathon/nytimesarticles/')
+		self.assertNotEqual(resp.content, '')
+
+

+ 0 - 0
hackathon_starter/hackathon/unittests/__init__.py


+ 8 - 0
hackathon_starter/hackathon/unittests/testcase.py

@@ -0,0 +1,8 @@
+import unittest
+
+def fun(x):
+    return x + 1
+
+class MyTest(unittest.TestCase):
+    def test(self):
+        self.assertEqual(fun(3), 4)

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 192 - 0
hackathon_starter/hackathon/unittests/testgithub.py


+ 28 - 0
hackathon_starter/hackathon/unittests/testinstagram.py

@@ -0,0 +1,28 @@
+import unittest
+from mock import Mock, patch, MagicMock
+from hackathon.scripts.instagram import InstagramOauthClient, searchForLocation
+
+
+class TwitterTests(unittest.TestCase):
+
+	def setUp(self):
+		self.authorization_url = 'https://api.instagram.com/oauth/authorize/?client_id='
+		self.access_token_url = 'https://api.instagram.com/oauth/access_token'
+		self.client_id = '77dc10b9e3624e908ce437c0a82da92e'
+		self.client_secret = '8bcf3139857149aaba7acaa61288427f'
+		self.googlemap_api_key = 'AIzaSyA7tttML91EGZ32S_FOOoxu-mbxN9Ojds8'
+
+
+	def test_TwitterOauthClient(self):
+		with patch('hackathon.scripts.instagram.requests') as mock_requests:
+			mock_requests.get.return_value = mock_response = Mock()
+			mock_response.status_code = 200
+			mock_response.json.return_value = jsonlist = {'access_token': '32833691.77dc10b.fe8fefd1dbf44cdea759714e9fcb44f3', 'user': {'username': 'mk200789', 'bio': '', 'website': '', 'profile_picture': 'https://instagramimages-a.akamaihd.net/profiles/profile_32833691_75sq_1333679391.jpg', 'full_name': '', 'id': '32833691'}}
+
+	def test_searchForLocation(self):
+		with patch('hackathon.scripts.instagram.searchForLocation') as mock_searchForLocation:
+			mock_searchForLocation.return_value = {'lat': 40.621372, 'lng': -74.00232690000001}
+			result = searchForLocation('7011 14th avenue, brooklyn, ny')
+			self.assertEqual(mock_searchForLocation.return_value, result)
+
+

+ 37 - 0
hackathon_starter/hackathon/unittests/teststeam.py

@@ -0,0 +1,37 @@
+import unittest
+from mock import Mock, patch, MagicMock
+from django.conf import settings
+from hackathon.scripts.steam import *
+
+
+class SteamTests(unittest.TestCase):
+
+    def setup(self):
+        self.API_URL = 'http://api.steampowered.com/IPlayerService/GetOwnedGames/v0001/'
+        self.APIKEY = '231E98D442E52B87110816C3D5114A1D'
+        self.userID = 'Marorin'
+        self.steamnum = '76561197997115778'
+
+    def testGetUserIDNum(self):
+        '''Test for steam.py method'''
+        
+        # Pulling from setUp
+        userID = self.userID
+        API_URL = self.API_URL
+        APIKEY = self.APIKEY   
+ 
+        # constructing the URL
+        self.url = API_URL + '?' + APIKEY + '&' + userID
+
+        with patch('hackathon.scripts.steam.steamIDpulling') as mock_steamIDPulling:
+            # Mocking the return value of this method.
+            mock_steamIDpulling = 76561197997115778
+        self.assertEqual(steamIDPulling(userID,APIKEY),mock_steamIDpulling)
+
+    def testgamespulling(self):
+        '''Test gamesPulling method'''
+        # Using test account due to huge JSON from normal one. 
+        steamnum = self.steamnum
+        with patch("requests.get") as mock_gamespulling:
+            mock_gamespulling.returnvalue = [{"response": {"game_count": 0}}]
+        self.assertEqual(gamesPulling(steamnum,APIKEY), mock_gamespulling.returnvalue)

+ 31 - 0
hackathon_starter/hackathon/unittests/testtumblr.py

@@ -0,0 +1,31 @@
+import unittest
+from mock import Mock, patch, MagicMock
+from hackathon.scripts.tumblr import *
+import oauth2
+import urlparse
+from django.conf import settings
+
+class TestTumblr(unittest.TestCase):
+
+	def setUp(self):
+		self.consumer_key = 'KrSbAc9cYLmIgVAn1D21FjRR97QWsutNMxkPDFBxo8CMWtMk4M'
+		self.consumer_secret = 'lKWMtL2Lj8zr5pY51PVqT8ugeoG0DjrdgoFewM0QTSyJ12jP8d'
+		self.consumer = oauth2.Consumer(key=self.consumer_key, secret=self.consumer_secret)
+		self.tumblrclient = TumblrOauthClient(self.consumer_key, self.consumer_secret)#, 'QBXdeeMKAnLzDbIG7dDNewTzRYyQoHZLbcn3bAFTCEFF5EXurl')
+		self.authorize = self.tumblrclient.authorize_url()
+
+		
+	def test_init(self):
+		self.assertEqual(self.consumer.key, self.consumer_key)
+		self.assertEqual(self.consumer.secret, self.consumer_secret)
+
+	#def test_get_authorize_url(self):
+	#	self.client = oauth2.Client(self.consumer)
+	#	self.assertEqual(self.client.consumer, self.consumer)
+	#	with patch('hackathon.scripts.tumblr.TumblrOauthClient.authorize_url') as mock_get_authorize_url:
+	#		mock_get_authorize_url.return_value = "oauth_token=QBXdeeMKAnLzDbIG7dDNewTzRYyQoHZLbcn3bAFTCEFF5EXurl&oauth_token_secret=u10SuRl2nzS8vFK4K7UPQexAvbIFBFrZBjA79XDlgoXFxv9ZhO&oauth_callback_confirmed=true"
+	#		self.request_token = dict(urlparse.parse_qsl(mock_get_authorize_url.return_value))
+	#		self.oauth_token = self.request_token['oauth_token']
+	#		self.oauth_token_secret = self.request_token['oauth_token_secret']		
+	#		link = "http://www.tumblr.com/oauth/authorize?oauth_token="+self.oauth_token+"&redirect_uri=http%3A%2F%2Flocalhost%3A8000/hackathon/tumblr"
+	#		self.assertEqual(self.authorize,link )

+ 43 - 0
hackathon_starter/hackathon/urls.py

@@ -0,0 +1,43 @@
+from django.conf.urls import patterns, url
+
+from hackathon import views
+
+urlpatterns = patterns('',
+    url(r'^$', views.index, name='index'),
+    url(r'^register/$', views.register, name='register'),
+    url(r'^login/$', views.user_login, name='login'),
+    url(r'^logout/$', views.user_logout, name='logout'),
+    url(r'^api/$', views.api_examples, name='api'),
+    url(r'^steam/$', views.steam, name='steam'),
+    url(r'^steamDiscountedGames/$', views.steamDiscountedGames, name='steamDiscountedGames'),
+    url(r'^githubResume/$', views.githubResume, name='githubResume'),
+    url(r'^githubUser/$', views.githubUser, name='githubUser'),
+    url(r'^githubTopRepositories/$', views.githubTopRepositories, name='githubTopRepositories'),
+    url(r'^tumblr/$', views.tumblr, name='tumblr'),
+    url(r'^linkedin/$', views.linkedin, name='linkedin'),
+    url(r'^snippets/$', views.snippet_list, name='snippets'),
+    url(r'^twilio/$', views.twilio, name='twilio'),
+    url(r'^instagram/$', views.instagram, name='instagram'),
+    url(r'^instagram_login/$', views.instagram_login, name='instagram_login'),
+    url(r'^instagramUser/$', views.instagramUser, name='instagramUser'),
+    url(r'^instagramMediaByLocation/$', views.instagramMediaByLocation, name='instagramMediaByLocation'),#
+    url(r'^instagramUserMedia/$', views.instagramUserMedia, name='instagramUserMedia'),
+    url(r'^twitter/$', views.twitter, name='twitter'),
+    url(r'^twitterTweets/$', views.twitterTweets, name='twitterTweets'),
+    url(r'^tumblr_login/$', views.tumblr_login, name='tumblr_login'),
+    url(r'^twitter_login/$', views.twitter_login, name='twitter_login'),
+    url(r'^github_login/$', views.github_login, name='github_login'),
+    url(r'^linkedin_login/$', views.linkedin_login, name='linkedin_login'),
+    url(r'^facebook/$', views.facebook, name='facebook'),
+    url(r'^quandlSnp500/$', views.quandlSnp500, name='quandlsnp500'),
+    url(r'^quandlNasdaq/$', views.quandlNasdaq, name='quandlnasdaq'),
+    url(r'^quandlDowJones/$', views.quandlDowJones, name='quandldowjones'),
+    url(r'^quandlstocks/$', views.quandlstocks, name='quandlstocks'),
+    url(r'^nytimespop/$', views.nytimespop, name='nytimespop'),
+    url(r'^nytimestop/$', views.nytimestop, name='nytimestop'),
+    url(r'^nytimesarticles/$', views.nytimesarticles, name='nytimesarticles'),
+    url(r'^meetup/$', views.meetup, name='meetup'),
+    url(r'^meetupToken/$', views.meetupToken, name='meetupToken'),
+    url(r'^meetupUser/$', views.meetupUser, name='meetupUser'),
+    url(r'^yelp/$', views.yelp, name='yelp'),
+)

+ 622 - 0
hackathon_starter/hackathon/views.py

@@ -0,0 +1,622 @@
+# Django
+from django.shortcuts import render
+from django.contrib.auth import logout
+from django.template import RequestContext, loader
+from django.contrib.auth import authenticate, login
+from django.http import HttpResponse, HttpResponseRedirect
+from django.conf import settings
+from django.contrib.auth import authenticate, login, logout
+from django.contrib.auth.models import User
+from django.contrib.auth.decorators import login_required
+from django.views.decorators.csrf import csrf_exempt
+from django.http import JsonResponse
+
+# Scripts
+from scripts.steam import gamespulling, steamidpulling 
+from scripts.github import *
+from scripts.tumblr import TumblrOauthClient
+from scripts.twilioapi import *
+from scripts.instagram import *
+from scripts.scraper import steamDiscounts
+from scripts.quandl import *
+from scripts.twitter import TwitterOauthClient
+from scripts.nytimes import *
+from scripts.meetup import *
+from scripts.linkedin import LinkedinOauthClient
+from scripts.yelp import requestData
+
+# Python
+import oauth2 as oauth
+import simplejson as json
+from rest_framework.renderers import JSONRenderer
+from rest_framework.parsers import JSONParser
+
+# Models
+from hackathon.models import Snippet, Profile, InstagramProfile, TwitterProfile, MeetupToken, GithubProfile, LinkedinProfile
+from hackathon.serializers import SnippetSerializer
+from hackathon.forms import UserForm
+
+
+profile_track = None
+getTumblr = TumblrOauthClient(settings.TUMBLR_CONSUMER_KEY, settings.TUMBLR_CONSUMER_SECRET)
+getInstagram = InstagramOauthClient(settings.INSTAGRAM_CLIENT_ID, settings.INSTAGRAM_CLIENT_SECRET)
+getTwitter = TwitterOauthClient(settings.TWITTER_CONSUMER_KEY, settings.TWITTER_CONSUMER_SECRET, settings.TWITTER_ACCESS_TOKEN, settings.TWITTER_ACCESS_TOKEN_SECRET)
+getGithub = GithubOauthClient('2a11ce63ea7952d21f02', '7e20f82a34698fb33fc837186e96b12aaca2618d')
+getLinkedIn = LinkedinOauthClient(settings.LINKEDIN_CLIENT_ID, settings.LINKEDIN_CLIENT_SECRET)
+
+def index(request):
+    print "index: " + str(request.user)
+
+    if not request.user.is_active:
+        if request.GET.items():
+            if profile_track == 'github':
+                code = request.GET['code']
+                getGithub.get_access_token(code)
+                getGithub.getUserInfo()
+                print getGithub.access_token
+                try:
+                    user = User.objects.get(username = getGithub.username + '_github')
+                except User.DoesNotExist:
+                    username = getGithub.username + '_github'
+                    new_user = User.objects.create_user(username, username+'@madewithgithub.com', 'password')
+                    new_user.save()
+                    try:
+                        profile = GithubProfile.objects.get(user = new_user.id)
+                        profile.access_token = getGithub.access_token
+                    except GithubProfile.DoesNotExist:
+                        profile = GithubProfile(user=new_user, access_token=getGithub.access_token, scopes=getGithub.scopes ,github_user=getGithub.username)
+                    profile.save()
+                    #profile = GithubProfile(user=new_user, access_token=getGithub.access_token, scopes=getGithub.scopes ,github_user=getGithub.username)
+                    #profile.save()
+                user = authenticate(username=getGithub.username+'_github', password='password')
+                login(request, user)
+            elif profile_track == 'twitter':
+                oauth_verifier = request.GET['oauth_verifier']
+                getTwitter.get_access_token_url(oauth_verifier) 
+
+                try:
+                    user = User.objects.get(username = getTwitter.username + '_twitter')#(username=getTwitter.username)
+                except User.DoesNotExist:
+                    username = getTwitter.username + '_twitter'
+                    new_user = User.objects.create_user(username, username+'@madewithtwitter.com', 'password')
+                    new_user.save()
+                    profile = TwitterProfile(user = new_user,oauth_token = getTwitter.oauth_token, oauth_token_secret= getTwitter.oauth_token_secret, twitter_user=getTwitter.username)
+                    profile.save()
+                user = authenticate(username=getTwitter.username+'_twitter', password='password')
+                login(request, user)
+            elif profile_track == 'instagram':
+                code = request.GET['code']
+                getInstagram.get_access_token(code)
+
+                try: 
+                    user = User.objects.get(username=getInstagram.user_data['username']+'_instagram')
+                except User.DoesNotExist:
+                    username = getInstagram.user_data['username']+'_instagram'
+                    new_user = User.objects.create_user(username, username+'@madewithinstagram.com', 'password')
+                    new_user.save()
+                    profile = InstagramProfile(user = new_user, access_token = getInstagram.access_token, instagram_user=getInstagram.user_data['username'])
+                    profile.save()
+                user = authenticate(username=getInstagram.user_data['username']+'_instagram' , password='password')
+                login(request, user)
+            elif profile_track == 'linkedin':
+                code = request.GET['code']
+                getLinkedIn.get_access_token(code)
+                getLinkedIn.getUserInfo()
+
+                try:
+                    user = User.objects.get(username=getLinkedIn.user_id+'_linkedin')
+                except User.DoesNotExist:
+                    username = getLinkedIn.user_id+'_linkedin'
+                    new_user = User.objects.create_user(username, username+'@madwithlinkedin.com', 'password')
+                    new_user.save()
+                    try:
+                        profile =LinkedinProfile.objects.get(user = new_user.id)
+                        profile.access_token = LinkedinProfile.access_token
+                    except LinkedinProfile.DoesNotExist:
+                        profile = LinkedinProfile(user=new_user, access_token=getLinkedIn.access_token, linkedin_user=getLinkedIn.user_id)
+                    profile.save()
+                user = authenticate(username=getLinkedIn.user_id+'_linkedin', password='password')
+                login(request, user)
+    else:
+        if request.GET.items():
+            user = User.objects.get(username = request.user.username)
+            if profile_track == 'github':
+                code = request.GET['code']
+                getGithub.get_access_token(code)
+                getGithub.getUserInfo()
+
+                try:
+                    githubUser = GithubProfile.objects.get(user=user.id)
+                except GithubProfile.DoesNotExist:
+                    profile = GithubProfile(user=new_user, access_token=getGithub.access_token, scopes=getGithub.scopes ,github_user=getGithub.username)
+                    profile.save()
+            elif profile_track == 'twitter':
+                oauth_verifier = request.GET['oauth_verifier']
+                getTwitter.get_access_token_url(oauth_verifier)
+
+                try:
+                    twitterUser = TwitterProfile.objects.get(user = user.id)
+                except TwitterProfile.DoesNotExist:
+                    profile = TwitterProfile(user = user, oauth_token = getTwitter.oauth_token, oauth_token_secret= getTwitter.oauth_token_secret, twitter_user=getTwitter.username)
+                    profile.save()
+            elif profile_track == 'instagram':
+                code = request.GET['code']
+                getInstagram.get_access_token(code)
+
+                try: 
+                    instagramUser = InstagramProfile.objects.get(user= user.id)
+                except InstagramProfile.DoesNotExist:
+                    profile = InstagramProfile(user = user, access_token = getInstagram.access_token, instagram_user=getInstagram.user_data['username'])
+                    profile.save()
+            elif profile_track == 'linkedin':
+                code = request.GET['code']
+                getLinkedIn.get_access_token(code)
+                getLinkedIn.getUserInfo()
+
+                try:
+                    linkedinUser = LinkedinProfile.objects.get(user=user.id)
+                except LinkedinProfile.DoesNotExist:
+                    profile = LinkedinProfile(user = user, access_token = getLinkedIn.access_token, linkedin_user=getLinkedIn.user_id)
+                    profile.save()
+
+    context = {'hello': 'world'}
+    return render(request, 'hackathon/index.html', context)
+
+
+##################
+#  API Examples  #
+##################
+
+def api_examples(request):
+    instagram_url = getInstagram.get_authorize_url()
+    if not getTumblr.accessed:
+        obtain_oauth_verifier = getTumblr.authorize_url()
+    else:
+        obtain_oauth_verifier = '/hackathon/tumblr'
+    #obtain_oauth_verifier = getTumblr.authorize_url()
+    context = {'title': 'API Examples Page', 'tumblr_url': obtain_oauth_verifier, 'instagram_url':instagram_url}
+    return render(request, 'hackathon/api_examples.html', context)
+
+#################
+#   STEAM API   #
+#################
+
+def steam(request):
+    #Should link to test of Steam API example.
+    key = '231E98D442E52B87110816C3D5114A1D'
+    SteamUN = "Marorin"
+    steamID = steamidpulling(SteamUN, key)
+    game = gamespulling(steamID, key)
+    return render(request,'hackathon/steam.html', {"game": game })
+
+def steamDiscountedGames(request):
+    data = steamDiscounts()
+    return JsonResponse({ 'data': data })
+
+#################
+#  FACEBOOK API #
+#################
+
+def facebook(request):
+    '''A sample application that will publish a status update after going into the login process using the Javascript SDK '''
+    yourappid = '364831617044713'
+    return render(request, 'hackathon/facebook.html', { 'yourappid' : yourappid })
+
+
+#################
+#    YELP API   #
+#################
+
+def yelp(request):
+    data = {}
+    if request.method == 'POST':
+        location = request.POST.get('location')
+        data = requestData(location)
+    return render(request, 'hackathon/yelp.html', { 'data': data })
+
+#################
+#   MEETUP API  #
+#################
+
+def meetup(request):
+    REDIRECT_URI = 'http://127.0.0.1:8000/hackathon/meetupToken'
+    AUTHORIZE_URL = 'https://secure.meetup.com/oauth2/authorize?client_id=' + settings.MEETUP_CONSUMER_KEY + '&response_type=code' + '&redirect_uri=' + REDIRECT_URI
+    return HttpResponseRedirect(AUTHORIZE_URL)
+
+def meetupToken(request):
+    # print request.GET.get('code')
+    access_token_url = 'https://secure.meetup.com/oauth2/access?'
+    REDIRECT_URI = 'http://127.0.0.1:8000/hackathon/meetupToken'
+    url = access_token_url + 'client_id=' +  settings.MEETUP_CONSUMER_KEY + '&client_secret=' + settings.MEETUP_CONSUMER_SECRET + '&grant_type=authorization_code' + '&redirect_uri=' + REDIRECT_URI + '&code=' +  request.GET.get('code')
+
+    response = requests.post(url)
+    access_token = json.loads(response.content)['access_token']
+    # print access_token
+    #if not MeetupToken.objects.all()[0]:
+    if not MeetupToken.objects.all().exists():
+        meetupToken = MeetupToken(access_token = access_token)
+        meetupToken.save()
+    else:
+        meetupToken = MeetupToken(access_token = access_token)
+        MeetupToken.objects.all()[0] = meetupToken
+    return HttpResponseRedirect('http://127.0.0.1:8000/hackathon/meetupUser/')
+
+def meetupUser(request): 
+    if not MeetupToken.objects.all().exists():
+        return HttpResponseRedirect('http://127.0.0.1:8000/hackathon/meetup')
+    access_token = MeetupToken.objects.all()[0]
+    meetupData = {}
+    userData = retrieveUserData('https://api.meetup.com/2/member/self/?access_token=' + str(access_token))
+    meetupData['userData'] = userData
+    return render(request, 'hackathon/meetup.html', { 'data': meetupData })
+
+#################
+#   QUANDL API  #
+#################
+
+def quandlDowJones(request):
+    '''Returns JSON response about the latest dowjones index.'''
+    dowjonesdata = fetchData(settings.QUANDLAPIKEY, 'https://www.quandl.com/api/v1/datasets/BCB/UDJIAD1.json?')
+    print dowjonesdata
+    return JsonResponse({'data': dowjonesdata})
+
+def quandlSnp500(request):
+    '''Returns JSON response about the latest SNP 500 index.'''
+    snpdata = fetchData(settings.QUANDLAPIKEY, 'https://www.quandl.com/api/v1/datasets/YAHOO/INDEX_GSPC.json?')
+    return JsonResponse({'data': snpdata})
+
+def quandlNasdaq(request):
+    '''Returns JSON response about the latest nasdaq index.'''
+    nasdaqdata = fetchData(settings.QUANDLAPIKEY, 'https://www.quandl.com/api/v1/datasets/NASDAQOMX/COMP.json?')
+    return JsonResponse({'data': nasdaqdata})
+
+def quandlstocks(request):
+    everyData = {}
+    dowjonesdata = fetchData(settings.QUANDLAPIKEY, 'https://www.quandl.com/api/v1/datasets/BCB/UDJIAD1.json?')
+    everyData['dow'] = dowjonesdata
+    snpdata = fetchData(settings.QUANDLAPIKEY, 'https://www.quandl.com/api/v1/datasets/YAHOO/INDEX_GSPC.json?')
+    everyData['snp'] = snpdata
+    nasdaqdata = fetchData(settings.QUANDLAPIKEY, 'https://www.quandl.com/api/v1/datasets/NASDAQOMX/COMP.json?')
+    everyData['nasdaq'] = nasdaqdata
+    return render(request, 'hackathon/quandl.html', { 'everyData': everyData })
+
+#################
+#  NYTIMES API  #
+#################
+
+def nytimespop(request):
+    '''Returns JSON response about the most viewed articles for the last 24 hours.'''
+    popdata = fetcharticle(settings.POPAPIKEY, 'http://api.nytimes.com/svc/mostpopular/v2/mostviewed/all-sections/1.json?')
+    return JSONResponse({'data': popdata})
+
+def nytimestop(request):
+    '''Returns JSON response about the articles located in the homepage'''
+    topdata = fetcharticle(settings.TOPAPIKEY, 'http://api.nytimes.com/svc/topstories/v1/home.json?')
+    return JSONResponse({'data': topdata})
+
+def nytimesarticles(request):
+    everyData = {}
+    popdata = fetcharticle(settings.POPAPIKEY, 'http://api.nytimes.com/svc/mostpopular/v2/mostviewed/all-sections/1.json?')
+    topdata = topdata = fetcharticle(settings.TOPAPIKEY, 'http://api.nytimes.com/svc/topstories/v1/home.json?')
+    everyData['top'] = topdata
+    everyData['pop'] = popdata
+    return render(request, 'hackathon/nytimes.html', { 'everyData': everyData })
+
+#################
+#   GITHUB API  #
+#################
+
+def githubUser(request):
+    '''Returns Github Profile data for a specific user.'''
+    parsedData = {}
+    if request.method == 'POST':
+        user = request.POST.get('user')
+        parsedData['userData'] = getUserData(user, settings.GITHUB_CLIENT_ID, settings.GITHUB_CLIENT_SECRET)
+    return render(request, 'hackathon/github.html', {'data': parsedData})
+    # return JsonResponse({ 'data': parsedData })
+
+def githubTopRepositories(request):
+    '''Returns Top Commited Repositories for a specific Github User'''
+
+    parsedData = {}
+    if request.method == 'POST':
+        user = request.POST.get('user')
+        repositories = getUserRepositories(user, settings.GITHUB_CLIENT_ID, settings.GITHUB_CLIENT_SECRET)
+        list = getTopContributedRepositories(user, repositories, settings.GITHUB_CLIENT_ID, settings.GITHUB_CLIENT_SECRET)
+        filtered = filterCommits(list)
+        parsedData['committed'] = filtered
+        print parsedData
+    return render(request, 'hackathon/githubTopRepositories.html', {'data': parsedData})
+    # return JsonResponse({ 'data': parsedData })
+
+def githubResume(request):
+    '''A sample application which pulls various Github data to form a Resume of sorts'''
+    
+    allData = {}
+    userData = getUserData('DrkSephy', settings.GITHUB_CLIENT_ID, settings.GITHUB_CLIENT_SECRET)
+    repositories = getUserRepositories('DrkSephy', settings.GITHUB_CLIENT_ID, settings.GITHUB_CLIENT_SECRET)
+    list = getTopContributedRepositories('DrkSephy', repositories, settings.GITHUB_CLIENT_ID, settings.GITHUB_CLIENT_SECRET)
+    filtered = filterCommits(list)
+    stargazers = getStarGazerCount('DrkSephy', settings.GITHUB_CLIENT_ID, settings.GITHUB_CLIENT_SECRET)
+    filteredStargazers = filterStarGazerCount(stargazers)
+    forkedRepos = getForkedRepositories('DrkSephy', settings.GITHUB_CLIENT_ID, settings.GITHUB_CLIENT_SECRET)
+    allData['userData'] = userData
+    allData['filteredData'] = filtered
+    allData['filteredStargazers'] = filteredStargazers
+    allData['forkedRepos'] = forkedRepos
+    return render(request, 'hackathon/githubResume.html', { 'data': allData })
+
+
+#################
+#   TUMBLR API  #
+#################
+
+def tumblr(request):
+    ''' Tumblr api calls '''
+    if not getTumblr.accessed:
+        oauth_verifier = request.GET.get('oauth_verifier')
+        getTumblr.access_token_url(oauth_verifier)
+    if request.user not in User.objects.all():
+        try:
+            user_info, total_blog = getTumblr.getUserInfo()
+            username = str(user_info['name'])+ "2"
+            user = User.objects.get(username=username)
+        except User.DoesNotExist:
+            user_info, total_blog = getTumblr.getUserInfo()
+            username = str(user_info['name'])+ "2"
+            new_user = User.objects.create_user(username, username+'@tumblr.com','password')
+            new_user.save()
+            profile =Profile()
+            profile.user = new_user
+            profile.oauth_token = getTumblr.oauth_token
+            profile.oauth_secret = getTumblr.oauth_token_secret
+            profile.save()
+
+        user = authenticate(username=username, password='password')
+        login(request, user)
+
+    #get blogger twitterthecomic's blog information
+    blog = getTumblr.getBlogInfo('twitterthecomic')
+    #get tags that was tagged along starbucks
+    tagged_blog = getTumblr.getTaggedInfo("starbucks")
+    #get blog information tagged with starbucks
+    blogontag = getTumblr.getTaggedBlog("starbucks")
+
+    context = {'title': "What's up Starbucks?", 'blogData': blog, 'blogTag': tagged_blog, 'blogontag': blogontag}
+    return render(request, 'hackathon/tumblr.html', context)
+
+
+####################
+#   INSTAGRAM API  #
+####################
+
+def instagram(request):
+    print getInstagram.is_authorized
+
+    if getInstagram.is_authorized:
+        if request.method == 'GET':
+            if request.GET.items():
+                instagram_tag = request.GET.get('instagram_tag')
+                instagramUser = InstagramProfile.objects.get(user = request.user)
+                tagged_media = getTaggedMedia(instagram_tag, instagramUser.access_token)
+            else:
+                instagram_tag, tagged_media = '', ''
+    else:
+        global profile_track
+        profile_track = 'instagram'
+        instagram_url =getInstagram.get_authorize_url()
+        return HttpResponseRedirect(instagram_url)
+    
+    context = {'title': 'Instagram', 'tagged_media': tagged_media, 'search_tag': instagram_tag}
+    return render(request, 'hackathon/instagram.html', context)
+
+def instagramUser(request):
+    ''' Returns JSON response about a specific Instagram User. '''
+
+    access_token = InstagramProfile.objects.get(instagram_user='mk200789').access_token
+    parsedData = getUserInfo(access_token)
+    return JsonResponse({ 'data': parsedData })
+
+def instagramUserMedia(request):
+    ''' Returns JSON response about a specific Instagram User's Media. '''
+
+    access_token = InstagramProfile.objects.get(instagram_user='mk200789').access_token
+    parsedData = getUserMedia(32833691, access_token)
+    return JsonResponse({'data': parsedData })
+
+def instagramMediaByLocation(request):
+    print request.user
+    if request.method == 'GET':
+        if request.GET.items():
+            #check if user has a User profile
+            if request.user in User.objects.all():
+                #check if user has an Instagram profile
+                user = User.objects.get(username=request.user)
+                #if user has an Instagram profile, query the search
+                if InstagramProfile.objects.all().filter(user=user.id):
+                    address = request.GET.get('address_field')
+                    access_token = InstagramProfile.objects.get(user=user.id).access_token
+                    geocode_result = searchForLocation(address)
+                    if geocode_result:
+                        location_ids = searchLocationIds(geocode_result['lat'], geocode_result['lng'], access_token)
+                        media = searchLocationMedia(location_ids, access_token)
+                        title = address
+                        err_msg = ''
+                else:
+                    title, media, err_msg, location_ids, geocode_result = 'Media by location','', str(request.user)+ ' does not have an InstagramProfile','', ''
+        else:
+            title, media, err_msg, location_ids, geocode_result = 'Media by location', '','', '', ''
+
+
+    context = {'title': title, 'geocode_result':geocode_result, 'media':media, 'list_id':location_ids, 'err_msg': err_msg}
+    return render(request, 'hackathon/instagram_q.html', context)
+
+
+####################
+#   TWITTER API    #
+####################
+
+def twitter(request):
+    if getTwitter.is_authorized:
+        value = getTwitter.get_trends_available(settings.YAHOO_CONSUMER_KEY)
+    else:
+        global profile_track
+        profile_track = 'twitter'
+        twitter_url = getTwitter.get_authorize_url()
+        return HttpResponseRedirect(twitter_url)
+
+    context ={'title': 'twitter', 'value': value}
+    return render(request, 'hackathon/twitter.html', context)
+
+def twitterTweets(request):
+    print getTwitter.is_authorized
+    if getTwitter.is_authorized:
+        #content = getTwitter.get_tweets()
+        if request.method == 'GET':
+            if request.GET.items():
+                tweets = request.GET.get('tweets')
+                content, jsonlist = getTwitter.get_tweets(tweets)
+            else:
+                content, jsonlist = '', ''
+    else:
+        global profile_track
+        profile_track = 'twitter'
+        twitter_url = getTwitter.get_authorize_url()
+        return HttpResponseRedirect(twitter_url)
+
+    context ={'title': 'twitter tweet', 'content': content, 'data': jsonlist}
+    return render(request, 'hackathon/twitter_tweet.html', context)
+
+
+##################
+#  LINKEDIN  API #
+##################
+
+def linkedin(request):
+    if getLinkedIn.is_authorized:
+        content = getLinkedIn.getUserInfo()
+    else:
+        global profile_track 
+        profile_track = 'linkedin'
+        linkedin_url = getLinkedIn.get_authorize_url()
+        return HttpResponseRedirect(linkedin_url)
+
+    context = {'title': 'linkedin example', 'content': content}
+    return render(request, 'hackathon/linkedin.html', context)
+
+
+#########################
+# Snippet RESTful Model #
+#########################
+
+class JSONResponse(HttpResponse):
+    """
+    An HttpResponse that renders its content into JSON.
+    """
+    def __init__(self, data, **kwargs):
+        content = JSONRenderer().render(data)
+        kwargs['content_type'] = 'application/json'
+        super(JSONResponse, self).__init__(content, **kwargs)
+
+@csrf_exempt
+def snippet_list(request):
+    """
+    List all code snippets, or create a new snippet.
+    """
+    if request.method == 'GET':
+        snippets = Snippet.objects.all()
+        serializer = SnippetSerializer(snippets, many=True)
+        return JSONResponse(serializer.data)
+
+
+##################
+#   Twilio API   #
+##################
+
+def twilio(request):
+    if request.method == 'POST':
+        number = request.POST.get('number')
+        message = request.POST.get('message')
+        sendSMS(str(message), str(number), '+13473781813')
+        context = {'message': 'Your message has been sent successfully!'}
+        return HttpResponseRedirect('/hackathon/api/')
+    return render(request, 'hackathon/twilio.html')
+
+
+######################
+# Registration Views #
+######################
+
+def register(request):
+    registered = False
+    if request.method == 'POST':
+        user_form = UserForm(data=request.POST)
+        if user_form.is_valid():
+            user = user_form.save()
+            user.set_password(user.password)
+            user.save()
+            registered = True
+        else:
+            print user_form.errors
+    else:
+        user_form = UserForm()
+
+    
+    return render(request,
+            'hackathon/register.html',
+            {'user_form': user_form, 'registered': registered} )
+
+def user_login(request):
+    if request.method == 'POST':
+        username = request.POST.get('username')
+        password = request.POST.get('password')
+
+        user = authenticate(username=username, password=password)
+
+        if user:
+            if user.is_active:
+                login(request, user)
+                return HttpResponseRedirect('/hackathon/')
+            else:
+                return HttpResponse("Your Django Hackathon account is disabled.")
+        else:
+            print "Invalid login details: {0}, {1}".format(username, password)
+            return HttpResponse("Invalid login details supplied.")
+
+    else:
+        return render(request, 'hackathon/login.html', {})
+
+def user_logout(request):
+    logout(request)
+    return HttpResponseRedirect('/hackathon/')
+
+
+def instagram_login(request):
+    global profile_track
+    profile_track = 'instagram'
+    instagram_url = getInstagram.get_authorize_url()
+    return HttpResponseRedirect(instagram_url)
+
+def tumblr_login(request):
+    global profile_track
+    profile_track = 'tumblr'
+    tumblr_url = getTumblr.authorize_url()
+    return HttpResponseRedirect(tumblr_url)
+
+def twitter_login(request):
+    global profile_track
+    profile_track = 'twitter'
+    twitter_url = getTwitter.get_authorize_url()     
+    return HttpResponseRedirect(twitter_url)
+
+def github_login(request):
+    global profile_track
+    profile_track = 'github'
+    github_url = getGithub.get_authorize_url()
+    return HttpResponseRedirect(github_url)
+
+def linkedin_login(request):
+    global profile_track
+    profile_track = 'linkedin'
+    linkedin_url = getLinkedIn.get_authorize_url()
+    return HttpResponseRedirect(linkedin_url)

+ 0 - 0
hackathon_starter/hackathon_starter/__init__.py


+ 146 - 0
hackathon_starter/hackathon_starter/settings.py

@@ -0,0 +1,146 @@
+"""
+Django settings for hackathon_starter project.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.7/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/1.7/ref/settings/
+"""
+
+# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
+import os
+BASE_DIR = os.path.dirname(os.path.dirname(__file__))
+
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
+
+# SECURITY WARNING: keep the secret key used in production secret!
+SECRET_KEY = 'keuhh=0*%do-ayvy*m2k=vss*$7)j8q!@u0+d^na7mi2(^!l!d'
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+TEMPLATE_DEBUG = True
+
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = (
+    'django.contrib.admin',
+    'django.contrib.auth',
+    'django.contrib.contenttypes',
+    'django.contrib.sessions',
+    'django.contrib.messages',
+    'django.contrib.staticfiles',
+    'hackathon',
+    'bootstrapform',
+    # 'django_openid',
+    'django_nose',
+    'rest_framework',
+    'corsheaders',
+)
+
+MIDDLEWARE_CLASSES = (
+    'django.contrib.sessions.middleware.SessionMiddleware',
+    'corsheaders.middleware.CorsMiddleware',
+    'django.middleware.common.CommonMiddleware',
+    'django.middleware.csrf.CsrfViewMiddleware',
+    'django.contrib.auth.middleware.AuthenticationMiddleware',
+    'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
+    'django.contrib.messages.middleware.MessageMiddleware',
+    'django.middleware.clickjacking.XFrameOptionsMiddleware',
+    #'django_openid_consumer.SessionConsumer',
+)
+
+ROOT_URLCONF = 'hackathon_starter.urls'
+
+WSGI_APPLICATION = 'hackathon_starter.wsgi.application'
+
+
+# Database
+# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
+
+DATABASES = {
+    'default': {
+        'ENGINE': 'django.db.backends.sqlite3',
+        'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
+    }
+}
+
+# Internationalization
+# https://docs.djangoproject.com/en/1.7/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'UTC'
+
+USE_I18N = True
+
+USE_L10N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/1.7/howto/static-files/
+
+STATIC_URL = '/static/'
+
+TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')]
+
+# Use nose to run all tests
+TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
+
+# Tell nose to measure coverage on the 'foo' and 'bar' apps
+NOSE_ARGS = [
+    '--with-coverage',
+    '--cover-package=hackathon/scripts',
+]
+
+CORS_ORIGIN_ALLOW_ALL = True
+
+############
+#   KEYS   #
+############
+
+GITHUB_CLIENT_ID = 'client_id=2404a1e21aebd902f6db'
+GITHUB_CLIENT_SECRET = 'client_secret=3da44769d4b7c9465fa4c812669148a163607c23'
+
+TUMBLR_CONSUMER_KEY = 'KrSbAc9cYLmIgVAn1D21FjRR97QWsutNMxkPDFBxo8CMWtMk4M'
+TUMBLR_CONSUMER_SECRET ='lKWMtL2Lj8zr5pY51PVqT8ugeoG0DjrdgoFewM0QTSyJ12jP8d'
+
+INSTAGRAM_CLIENT_ID = '77dc10b9e3624e908ce437c0a82da92e'
+INSTAGRAM_CLIENT_SECRET = '8bcf3139857149aaba7acaa61288427f'
+
+GOOGLEMAP_API_KEY = 'AIzaSyA7tttML91EGZ32S_FOOoxu-mbxN9Ojds8'
+YAHOO_CONSUMER_KEY = 'dj0yJmk9bUtPVmVpZEczZWp5JmQ9WVdrOWQxbDJkMjFhTmpRbWNHbzlNQS0tJnM9Y29uc3VtZXJzZWNyZXQmeD1iOQ--'
+YAHOO_CONSUMER_SECRET = '630e59649caf71255679853ca3f6b0580c571e98'
+YAHOO_APP_ID = 'wYvwmZ64'
+
+TWITTER_CONSUMER_KEY = 'MS8DNyi5HX9HhJgigL24VEkqA'
+TWITTER_CONSUMER_SECRET = '1QdaLTNyrGIoZUniToou5bqax8mo7yuzIm7o4XjxzMhBE4UPY1'
+TWITTER_ACCESS_TOKEN = '43035062-zulNy9FQtEb2i9DeRGQen62HEDf21hpwWcRVAEOOy'
+TWITTER_ACCESS_TOKEN_SECRET = 'EEssSDgD4JbXzksmWHW1stBVxNtwfj1nq5Pd2Plkm17wj'
+
+MEETUP_CONSUMER_KEY = 'p50vftdqq72tgotpaeqk5660un'
+MEETUP_CONSUMER_SECRET = 'i5l00ln2r4mcf161n6451hjoj8'
+
+BITBUCKET_CONSUMER_KEY = 'nQcSHrjPzaXRq7HjtJ'
+BITBUCKET_CONSUMER_SECRET = 'd8XzR8EzgADW9GnyQGb3pZE7rWBtc2RA'
+
+LINKEDIN_CLIENT_ID = '77p43ettu67h56'
+LINKEDIN_CLIENT_SECRET = '0NG9XjmS2IWL5pMl'
+
+YELP_CONSUMER_KEY = 'EXMisJNWez_PuR5pr06hyQ'
+YELP_CONSUMER_SECRET = 'VCK-4cDjtQ9Ra4HC5ltClNiJFXs'
+YELP_TOKEN = 'AWYVs7Vim7mwYyT1BLJA2xhNTs_vXLYS'
+YELP_TOKEN_SECRET = 'Rv4GrlYxYGhxUs14s0VBfk7JLJY'
+
+POPAPIKEY = 'be4cd251d8a4f1a3362689088bdb0255:0:71947444'
+TOPAPIKEY = 'c9655598e1fd4ff591f6d46f2321260e:17:71947444'
+
+QUANDLAPIKEY = 'fANs6ykrCdAxas7zpMz7'

+ 8 - 0
hackathon_starter/hackathon_starter/urls.py

@@ -0,0 +1,8 @@
+from django.conf.urls import patterns, include, url
+from django.contrib import admin
+
+urlpatterns = patterns('',
+    url(r'^hackathon/', include('hackathon.urls')),
+    url(r'^admin/', include(admin.site.urls)),
+    # url(r'^openid/(.*)', SessionConsumer()),
+)

+ 14 - 0
hackathon_starter/hackathon_starter/wsgi.py

@@ -0,0 +1,14 @@
+"""
+WSGI config for hackathon_starter project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
+"""
+
+import os
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hackathon_starter.settings")
+
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()

+ 68 - 0
hackathon_starter/index.rst

@@ -0,0 +1,68 @@
+.. Django Hackathon Starter documentation master file, created by
+   sphinx-quickstart on Sun Apr 12 22:33:44 2015.
+   You can adapt this file completely to your liking, but it should at least
+   contain the root `toctree` directive.
+
+Welcome to Django Hackathon Starter's documentation!
+====================================================
+
+Contents:
+
+.. toctree::
+   :maxdepth: 2
+
+Github
+======
+.. automodule:: github
+	:members:
+
+Instagram
+=========
+.. automodule:: instagram
+	:members:
+
+Steam
+=====
+.. automodule:: steam
+	:members:
+
+Tumblr
+======
+.. automodule:: tumblr
+	:members:
+
+Twilio
+======
+.. automodule:: twilioapi
+	:members:
+
+Twitter
+=======
+.. automodule:: twitter
+	:members:
+
+Scraper
+=======
+.. automodule:: scraper
+	:members:
+
+New York Times
+==============
+.. automodule:: nytimes
+	:members:
+
+Instagram
+=========
+.. automodule:: instagram
+	:members:
+
+
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+

+ 263 - 0
hackathon_starter/make.bat

@@ -0,0 +1,263 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+if "%SPHINXBUILD%" == "" (
+	set SPHINXBUILD=sphinx-build
+)
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+set I18NSPHINXOPTS=%SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+	set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+	:help
+	echo.Please use `make ^<target^>` where ^<target^> is one of
+	echo.  html       to make standalone HTML files
+	echo.  dirhtml    to make HTML files named index.html in directories
+	echo.  singlehtml to make a single large HTML file
+	echo.  pickle     to make pickle files
+	echo.  json       to make JSON files
+	echo.  htmlhelp   to make HTML files and a HTML help project
+	echo.  qthelp     to make HTML files and a qthelp project
+	echo.  devhelp    to make HTML files and a Devhelp project
+	echo.  epub       to make an epub
+	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+	echo.  text       to make text files
+	echo.  man        to make manual pages
+	echo.  texinfo    to make Texinfo files
+	echo.  gettext    to make PO message catalogs
+	echo.  changes    to make an overview over all changed/added/deprecated items
+	echo.  xml        to make Docutils-native XML files
+	echo.  pseudoxml  to make pseudoxml-XML files for display purposes
+	echo.  linkcheck  to check all external links for integrity
+	echo.  doctest    to run all doctests embedded in the documentation if enabled
+	echo.  coverage   to run coverage check of the documentation if enabled
+	goto end
+)
+
+if "%1" == "clean" (
+	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+	del /q /s %BUILDDIR%\*
+	goto end
+)
+
+
+REM Check if sphinx-build is available and fallback to Python version if any
+%SPHINXBUILD% 2> nul
+if errorlevel 9009 goto sphinx_python
+goto sphinx_ok
+
+:sphinx_python
+
+set SPHINXBUILD=python -m sphinx.__init__
+%SPHINXBUILD% 2> nul
+if errorlevel 9009 (
+	echo.
+	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
+	echo.installed, then set the SPHINXBUILD environment variable to point
+	echo.to the full path of the 'sphinx-build' executable. Alternatively you
+	echo.may add the Sphinx directory to PATH.
+	echo.
+	echo.If you don't have Sphinx installed, grab it from
+	echo.http://sphinx-doc.org/
+	exit /b 1
+)
+
+:sphinx_ok
+
+
+if "%1" == "html" (
+	%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+	goto end
+)
+
+if "%1" == "dirhtml" (
+	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+	goto end
+)
+
+if "%1" == "singlehtml" (
+	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+	goto end
+)
+
+if "%1" == "pickle" (
+	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the pickle files.
+	goto end
+)
+
+if "%1" == "json" (
+	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can process the JSON files.
+	goto end
+)
+
+if "%1" == "htmlhelp" (
+	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+	goto end
+)
+
+if "%1" == "qthelp" (
+	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\DjangoHackathonStarter.qhcp
+	echo.To view the help file:
+	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\DjangoHackathonStarter.ghc
+	goto end
+)
+
+if "%1" == "devhelp" (
+	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished.
+	goto end
+)
+
+if "%1" == "epub" (
+	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The epub file is in %BUILDDIR%/epub.
+	goto end
+)
+
+if "%1" == "latex" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "latexpdf" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	cd %BUILDDIR%/latex
+	make all-pdf
+	cd %~dp0
+	echo.
+	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "latexpdfja" (
+	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+	cd %BUILDDIR%/latex
+	make all-pdf-ja
+	cd %~dp0
+	echo.
+	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
+	goto end
+)
+
+if "%1" == "text" (
+	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The text files are in %BUILDDIR%/text.
+	goto end
+)
+
+if "%1" == "man" (
+	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The manual pages are in %BUILDDIR%/man.
+	goto end
+)
+
+if "%1" == "texinfo" (
+	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
+	goto end
+)
+
+if "%1" == "gettext" (
+	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+	goto end
+)
+
+if "%1" == "changes" (
+	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.The overview file is in %BUILDDIR%/changes.
+	goto end
+)
+
+if "%1" == "linkcheck" (
+	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+	goto end
+)
+
+if "%1" == "doctest" (
+	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+	goto end
+)
+
+if "%1" == "coverage" (
+	%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Testing of coverage in the sources finished, look at the ^
+results in %BUILDDIR%/coverage/python.txt.
+	goto end
+)
+
+if "%1" == "xml" (
+	%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The XML files are in %BUILDDIR%/xml.
+	goto end
+)
+
+if "%1" == "pseudoxml" (
+	%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
+	if errorlevel 1 exit /b 1
+	echo.
+	echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
+	goto end
+)
+
+:end

+ 10 - 0
hackathon_starter/manage.py

@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+import os
+import sys
+
+if __name__ == "__main__":
+    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "hackathon_starter.settings")
+
+    from django.core.management import execute_from_command_line
+
+    execute_from_command_line(sys.argv)

+ 3 - 0
ionic/.bowerrc

@@ -0,0 +1,3 @@
+{
+  "directory": "www/lib"
+}

+ 6 - 0
ionic/.gitignore

@@ -0,0 +1,6 @@
+# Specifies intentionally untracked files to ignore when using Git
+# http://git-scm.com/docs/gitignore
+
+node_modules/
+platforms/
+plugins/

+ 26 - 0
ionic/README.md

@@ -0,0 +1,26 @@
+Ionic App Base
+=====================
+
+A starting project for Ionic that optionally supports using custom SCSS.
+
+## Using this project
+
+We recommend using the [Ionic CLI](https://github.com/driftyco/ionic-cli) to create new Ionic projects that are based on this project but use a ready-made starter template.
+
+For example, to start a new Ionic project with the default tabs interface, make sure the `ionic` utility is installed:
+
+```bash
+$ npm install -g ionic
+```
+
+Then run:
+
+```bash
+$ ionic start myProject tabs
+```
+
+More info on this can be found on the Ionic [Getting Started](http://ionicframework.com/getting-started) page and the [Ionic CLI](https://github.com/driftyco/ionic-cli) repo.
+
+## Issues
+Issues have been disabled on this repo, if you do find an issue or have a question consider posting it on the [Ionic Forum](http://forum.ionicframework.com/).  Or else if there is truly an error, follow our guidelines for [submitting an issue](http://ionicframework.com/submit-issue/) to the main Ionic repository.
+

+ 7 - 0
ionic/bower.json

@@ -0,0 +1,7 @@
+{
+  "name": "HelloIonic",
+  "private": "true",
+  "devDependencies": {
+    "ionic": "driftyco/ionic-bower#1.0.0-rc.2"
+  }
+}

+ 49 - 0
ionic/config.xml

@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<widget id="com.ionicframework.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
+  <name>HelloCordova</name>
+  <description>
+        An Ionic Framework and Cordova project.
+    </description>
+  <author email="hi@ionicframework" href="http://ionicframework.com/">
+      Ionic Framework Team
+    </author>
+  <content src="index.html"/>
+  <access origin="*"/>
+  <preference name="webviewbounce" value="false"/>
+  <preference name="UIWebViewBounce" value="false"/>
+  <preference name="DisallowOverscroll" value="true"/>
+  <preference name="BackupWebStorage" value="none"/>
+  <preference name="SplashScreen" value="screen"/>
+  <preference name="SplashScreenDelay" value="3000"/>
+  <feature name="StatusBar">
+    <param name="ios-package" value="CDVStatusBar" onload="true"/>
+  </feature>
+  <platform name="ios">
+    <icon src="resources/ios/icon/icon.png" width="57" height="57"/>
+    <icon src="resources/ios/icon/icon@2x.png" width="114" height="114"/>
+    <icon src="resources/ios/icon/icon-40.png" width="40" height="40"/>
+    <icon src="resources/ios/icon/icon-40@2x.png" width="80" height="80"/>
+    <icon src="resources/ios/icon/icon-50.png" width="50" height="50"/>
+    <icon src="resources/ios/icon/icon-50@2x.png" width="100" height="100"/>
+    <icon src="resources/ios/icon/icon-60.png" width="60" height="60"/>
+    <icon src="resources/ios/icon/icon-60@2x.png" width="120" height="120"/>
+    <icon src="resources/ios/icon/icon-60@3x.png" width="180" height="180"/>
+    <icon src="resources/ios/icon/icon-72.png" width="72" height="72"/>
+    <icon src="resources/ios/icon/icon-72@2x.png" width="144" height="144"/>
+    <icon src="resources/ios/icon/icon-76.png" width="76" height="76"/>
+    <icon src="resources/ios/icon/icon-76@2x.png" width="152" height="152"/>
+    <icon src="resources/ios/icon/icon-small.png" width="29" height="29"/>
+    <icon src="resources/ios/icon/icon-small@2x.png" width="58" height="58"/>
+    <icon src="resources/ios/icon/icon-small@3x.png" width="87" height="87"/>
+    <splash src="resources/ios/splash/Default-568h@2x~iphone.png" height="1136" width="640"/>
+    <splash src="resources/ios/splash/Default-667h.png" height="1334" width="750"/>
+    <splash src="resources/ios/splash/Default-736h.png" height="2208" width="1242"/>
+    <splash src="resources/ios/splash/Default-Landscape-736h.png" height="1242" width="2208"/>
+    <splash src="resources/ios/splash/Default-Landscape@2x~ipad.png" height="1536" width="2048"/>
+    <splash src="resources/ios/splash/Default-Landscape~ipad.png" height="768" width="1024"/>
+    <splash src="resources/ios/splash/Default-Portrait@2x~ipad.png" height="2048" width="1536"/>
+    <splash src="resources/ios/splash/Default-Portrait~ipad.png" height="1024" width="768"/>
+    <splash src="resources/ios/splash/Default@2x~iphone.png" height="960" width="640"/>
+    <splash src="resources/ios/splash/Default~iphone.png" height="480" width="320"/>
+  </platform>
+</widget>

+ 0 - 0
ionic/gulpfile.js


Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio