A list of the best LeetCode questions that teach you core concepts and techniques for each category/type of problem. Many other LeetCode questions are a mashup of the techniques from these individual questions.
This file contains hidden or 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
| javascript:(function(){ allowCopyAndPaste = function(e){ e.stopImmediatePropagation(); return true; }; document.addEventListener('copy', allowCopyAndPaste, true); document.addEventListener('paste', allowCopyAndPaste, true); document.addEventListener('onpaste', allowCopyAndPaste, true); })(); |
This file contains hidden or 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
| name | description | |
|---|---|---|
| apache/airflow | A platform to programmatically author, schedule, and monitor workflows. | |
| apache/mxnet | Flexible and efficient deep learning library for training and deploying neural networks. | |
| astropy/astropy | A community Python library for astronomy. | |
| celery/celery | Distributed task queue for Python. | |
| conan-io/conan | The open-source C/C++ package manager. | |
| conda/conda | Cross-platform, language-agnostic binary package manager. | |
| dagster-io/dagster | An orchestration platform for the development, production, and observation of data assets. | |
| DataDog/integrations-core | Core integrations of the Datadog Agent. | |
| django/django | The Web framework for perfectionists with deadlines. |
This file contains hidden or 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
| import os | |
| import requests | |
| from requests import exceptions, request | |
| class GitHubQuery: | |
| BASE_URL = "https://api.github.com/graphql" | |
| ORGANIZATION = "org_name" | |
| def __init__( |
This file contains hidden or 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 annotations | |
| from abc import ABC, abstractmethod | |
| class AbstractFactory(ABC): | |
| """ | |
| The Abstract Factory interface declares a set of methods that return | |
| different abstract products. These products are called a family and are | |
| related by a high-level theme or concept. Products of one family are usually | |
| able to collaborate among themselves. A family of products may have several |
This file contains hidden or 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
| export tiller_pod="$(kubectl get pod -l app=helm,name=tiller --namespace gitlab-managed-apps -o name|cut -d/ -f2)" | |
| kubectl port-forward "$tiller_pod" 44134:44134 --namespace gitlab-managed-apps </dev/null >/dev/null 2>&1 & | |
| export HELM_HOST="localhost:44134" | |
| helm init --client-only | |
| export TILLER_NAMESPACE="gitlab-managed-apps" | |
| kubectl get secrets/tiller-secret -n "$TILLER_NAMESPACE" -o "jsonpath={.data['ca\.crt']}" | base64 --decode > tiller-ca.crt | |
| kubectl get secrets/tiller-secret -n "$TILLER_NAMESPACE" -o "jsonpath={.data['tls\.crt']}" | base64 --decode > tiller.crt | |
| kubectl get secrets/tiller-secret -n "$TILLER_NAMESPACE" -o "jsonpath={.data['tls\.key']}" | base64 --decode > tiller.key | |
| helm list --tiller-connection-timeout 30 --tls --tls-ca-cert tiller-ca.crt --tls-cert tiller.crt --tls-key tiller.key --all --tiller-namespace gitlab-managed-apps |
This file contains hidden or 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
| kubectl -n kube-system create serviceaccount tiller | |
| kubectl create clusterrolebinding tiller \ | |
| --clusterrole=cluster-admin \ | |
| --serviceaccount=kube-system:tiller | |
| helm init --service-account tiller |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| """ | |
| pg_uuid | |
| ~~~~~~~~~~~~~~~~ | |
| <NO DESCRIPTION>. | |
| :copyright: (c) 2018 by WRDLL <4ever@wrdll.com> | |
| """ | |
| from flask import Flask |
This file contains hidden or 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 functools import wraps | |
| from flask import Flask, g, session, request, abort, jsonify | |
| from flask_migrate import MigrateCommand, Migrate | |
| from flask_script import Manager | |
| from flask_sqlalchemy import SQLAlchemy | |
| flask_app = Flask(__name__, static_folder='./static') | |
| db = SQLAlchemy() | |
| migrate = Migrate() |
This file contains hidden or 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 node:8.9.4-alpine AS build_box | |
| WORKDIR /app | |
| COPY package*.json ./ | |
| RUN NODE_ENV=dev npm install | |
| COPY . /app | |
| RUN npm run build | |
| # Make final image | |
| FROM node:8.9.4-alpine |
NewerOlder