This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import | |
from flask import current_app | |
from py2neo import Graph | |
import os | |
username = os.environ.get('NEO4J_USERNAME') | |
password = os.environ.get('NEO4J_PASSWORD') | |
class Py2Neo(object): | |
def __init__(self, app=None): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Key Docker Commands | |
docker build --pull --no-cache --tag=<image-name> . | |
docker-compose up | |
docker-compose down |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ docker build -t <image-name> . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker compose up run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:latest | |
WORKDIR app | |
COPY . /app | |
RUN python3 -m pip install -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
psycopg2==2.9.3 | |
pytest== 7.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.9" | |
services: | |
postgres: | |
image: postgres:10.5 | |
restart: always | |
environment: | |
- POSTGRES_USER=<username> | |
- POSTGRES_PASSWORD=<password> | |
ports: | |
- '5433:5432' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************************************** | |
* Author: Alberto Gutiérrez Jácome <agjacome@gmail.com> | |
* Date: 16/09/2012 | |
* | |
* Compilation: javac KdTree.java | |
* Execution: not applicable | |
* Dependencies: Point2D.java RectHV.java StdDraw.java Queue.java | |
* | |
* Description: A mutable data type that uses a 2d-tree to represent a set of | |
* points in the unit square. A 2d-tree is a generalization of a BST to |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
## Author: Taiwo O. Adetiloye | |
## Date: Aug 28, 2020 | |
## Solution 1 | |
### | |
''' Corner cases | |
1. If the prefix_length is greater that the length of the key prefix, | |
then the formulation would be distorted | |
2. The dictionary is not ideal for situation where the |
NewerOlder