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
apt update | |
apt install -y wget gnupg | |
wget -qO- https://www.mongodb.org/static/pgp/server-8.0.asc | tee /etc/apt/trusted.gpg.d/server-8.0.asc | |
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/8.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-8.0.list | |
apt update | |
apt install -y mongodb-mongosh |
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
# 1. Create a project variable named `MIN_APPROVALS_NEEDED`, must be an integer | |
# 2. Check approvals will use the token to fetch REST API and get the reviews for a current Pull Request | |
# 3. With JQ it parses all that has label "APPROVED" and count | |
# 4. If greater or equal, exit successfully. Otherwise, fail | |
# | |
env: | |
MIN_APPROVALS_NEEDED: ${{ vars.MIN_APPROVALS_NEEDED }} | |
jobs: |
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
/* JS snippet that can be ran in the console to crawl for cartography codes | |
* of houses in Campinas: | |
* 1. Log in: https://cidadao.campinas.sp.gov.br/ | |
* 2. Go to 'IPTU - CONSULTA IPTU DO EXERCICIO' | |
* 3. Run the script | |
* | |
* The output should be a list of valid cartography codes. | |
* Each cartography code starts with a BASE_CODE that can be found here: | |
* https://zoneamento.campinas.sp.gov.br/ | |
* Use this to adjust the BASE_CODE |
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 typing import List, Optional | |
import sys | |
class MinHeap: | |
""" | |
Abstracting the node data as Int but could be Any, given a custom comparison | |
function to guide ourselves on how to compare the nodes. |
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 typing import Any, List, Optional | |
class SLLNode: | |
def __init__(self, data: Any, next_node: Optional[SLLNode] = None): | |
self.data = data | |
self.next_node = next_node | |
def __str__(self): |