Skip to content

Instantly share code, notes, and snippets.

@rajgoesout
rajgoesout / Portfile
Last active April 15, 2019 13:14
buildbot
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup python
name buildbot
version 2.2.0
categories devel python
platforms darwin
supported_archs noarch
def max_crossing_subarray(a, low, mid, high):
left_sum = -float("inf")
current_sum = 0
for i in range(mid, low-1, -1):
current_sum += a[i]
if current_sum > left_sum:
left_sum = current_sum
max_left = i
right_sum = -float("inf")
current_sum = 0
<!-- {% load staticfiles %} -->
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}AnimalDex{% endblock %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<!-- UIkit CSS -->
@rajgoesout
rajgoesout / ngrok-installation.md
Created September 8, 2018 12:21 — forked from jwebcat/ngrok-installation.md
Installing ngrok on Mac

#Installing ngrok on OSX

  1. Download ngrok
  2. Unzip it to your Applications directory
  3. Create a symlink (instructions below)

Creating a symlink to ngrok

Run the following two commands in Terminal to create the symlink.

# cd into your local bin directory
@rajgoesout
rajgoesout / update_fork.md
Created September 1, 2018 16:54
Keep fork up to date.

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

Method 1:

cd into project directory virtualenv -p python3 . to activate virtual environment: source bin/activate to deactivate virtual environment: deactivate to install django: pip install django

Method 2:

cd into project directory python3 -m venv venv