Skip to content

Instantly share code, notes, and snippets.

View UPstartDeveloper's full-sized avatar
💭
Solving New Problems

Zain Raza UPstartDeveloper

💭
Solving New Problems
View GitHub Profile
import math
import numpy as np
from collections import deque
class PageVertex:
"""
Representation of a single web page and its linked pages.
"""
def __init__(self, id):
@UPstartDeveloper
UPstartDeveloper / deployment.md
Last active November 16, 2020 13:14
How to Successfully Deploy a Django Project, on the FIRST PUSH!!

How to Successfully Deploy a Django Project, on the FIRST PUSH

Introduction

Being able to deploy a project is one of the signs of a truly great developer in-the-making. If you master this skill, it will help you breathe easier and perform better in all environments in which you build software products - e.g. hackathons, your hobby projects, the Intensives at Make School, and perhaps even your full-time developer job!

This is the process that has worked for me so far, in pushing all my individual as well as team projects made in Django into production. I used Heroku for all the deployments.

My recommendation is to follow this step right at the beginning of your project! Deployment is one of those steps that everyone struggles with, so get it out of the way early on in development so it makes all future deployments much easier!

<!-- simulator/templates/partials/population-tree.html -->
<script src="https://d3js.org/d3.v5.min.js"></script>
<script>
$(document).ready(function(){
// get the data on the InfectedNode instancesfrom the API, using AJAX
let endpoint = '/api/{{experiment.id}}/chart/infected-node/';
$.ajax({
method: "GET",
url: endpoint,
success: function(data){
#!python3
'''
Credit to Alan Davis for providing the starter code used in implemennting
this class:
https://github.com/Make-School-Courses/CS-2.1-Trees-Sorting/blob/master/Code/MWayTreeNode.py
'''
class MWayTreeNode:
"""MWayTreeNode: A node for use in a m-way tree that stores a