Skip to content

Instantly share code, notes, and snippets.

View dojutsu-user's full-sized avatar

Vaibhav Gupta dojutsu-user

  • India
  • 01:50 (UTC +05:30)
View GitHub Profile
@dojutsu-user
dojutsu-user / Django With React.md
Last active December 9, 2018 07:42
Setting up Django (with DRF) project to work with React
  • Install django-cors-headers: pipenv install django-cors-headers
  • In your settings.py
    • Add corsheaders to your INSTALLED_APPS
    • Add the following Middlewares:
    MIDDLEWARE = [
    'corsheaders.middleware.CorsMiddleware', # new
    'django.middleware.common.CommonMiddleware', # new
    'django.middleware.security.SecurityMiddleware',

'django.contrib.sessions.middleware.SessionMiddleware',

import requests
from requests.exceptions import ConnectionError
def get_response(link):
"""Make a GET request to the link
:param link: Valid HTTP/HTTPS link
:type link: str
:returns A response object
:rtype: requests.models.Response
def get_org_projects_info(org_link):
"""Get organisation's projects information
:param org_link: Valid link to the organisation's info page of a specific year
:type org_link: str
:returns: A list of dictionaries of each project's title, descrition and link of project
:rtype: list
"""
response = get_response(org_link)
if response.ok:
import os
import json
PATH_TO_OUTPUT_FILE = os.path.join('.', 'Dataset', '2009-2015.json')
def main():
final_dict = {}
year_with_link = get_year_with_link()
@dojutsu-user
dojutsu-user / GSoC'19-ReadTheDocs.md
Last active August 19, 2020 05:44
Google Summer of Code 2019 Final Report

GSoC'19 with Read the Docs

Student: