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
# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. | |
FROM ubuntu:bionic as build | |
RUN apt-get update && apt-get install -y openjdk-8-jdk maven python3 python3-venv | |
# Create a first layer to cache the "Maven World" in the local repository. | |
# Incremental docker builds will always resume after that, unless you update the pom | |
WORKDIR /mvn | |
COPY pom.xml /mvn/ |
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
# Copyright (c) 2018, 2019 Oracle and/or its affiliates. All rights reserved. | |
FROM ubuntu:bionic as build | |
RUN apt-get update && apt-get install -y openjdk-8-jdk maven python3 python3-venv | |
# Create a first layer to cache the "Maven World" in the local repository. | |
# Incremental docker builds will always resume after that, unless you update the pom | |
WORKDIR /mvn | |
COPY pom.xml /mvn/ |
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
class Solution: | |
def findDiagonalOrder(self, matrix): | |
""" | |
:type matrix: List[List[int]] | |
:rtype: List[int] | |
""" | |
# 00 (right: col+1) //0 | |
# 01, 10 (left: row+1, col-1) -> (if col==0: row+1) //1 | |
# 20, 11, 02 (right: row-1, col+1) -> if(row==0: col+1) //2 | |
# 03, 12, 21, 30 (left_middle: row+1, col-1) -> if col==0: col+1 //3--> col+1, (right_middle,,, row+1) ::> |
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
class Solution: | |
def rotate(self, matrix): | |
""" | |
:type matrix: List[List[int]] | |
:rtype: void Do not return anything, modify matrix in-place instead. | |
""" | |
# S: Ceil Py without math | |
for level in range(len(matrix)//2): | |
# 4-> 2, 5 -> 2. | |
# SEarched floor |
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
class Solution: | |
def productExceptSelf(self, nums): | |
output = [] | |
product = 1 | |
for index in range(len(nums)): | |
product = 1 if index == 0 else product * nums[index-1] | |
output.append(product) | |
product = 1 | |
for index in range(len(nums)-1, -1, -1): |
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
#signals.py | |
from django.dispatch import Signal | |
user_login = Signal(providing_args=["request", "user"]) | |
#views.py | |
from foo import signals |