- Clone the following Github repos:
- Create a python3 virtualenv for mhmid
- Install the middleware requirements:
pip install -r mhmid/requirements.txt - Install all the modules:
pip install -e .in each repo directory
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 random | |
| import yaml | |
| import json | |
| import time | |
| import requests | |
| # Config Variables | |
| ZYTE_KEY = "ADD API KEY HERE" |
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 sys | |
| import json | |
| import logging | |
| import click | |
| from yaml import safe_load | |
| from flask.cli import AppGroup | |
| from tcpa import model, provider |
User Story 1: As a MapHabit Community Manager, I can link my PCC credentials to my MapHabit account.
To create/update a relationship between the Maphabit user and the PCC user, make the following request:
curl -X PATCH \
"https://api-staging.middleware.maphabit.com/v1/mh/community/community123/user/123/rel/pccUser" \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer token" \
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
| countries_list = [ | |
| ('US', 'UNITED STATES'), | |
| ('AF', 'AFGHANISTAN'), | |
| ('AX', 'ALAND ISLANDS'), | |
| ('AL', 'ALBANIA'), | |
| ('DZ', 'ALGERIA'), | |
| ('AS', 'AMERICAN SAMOA'), | |
| ('AD', 'ANDORRA'), | |
| ('AO', 'ANGOLA'), | |
| ('AI', 'ANGUILLA'), |
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
| states = [ | |
| ('AK', 'Alaska'), | |
| ('AL', 'Alabama'), | |
| ('AR', 'Arkansas'), | |
| ('AS', 'American Samoa'), | |
| ('AZ', 'Arizona'), | |
| ('CA', 'California'), | |
| ('CO', 'Colorado'), | |
| ('CT', 'Connecticut'), | |
| ('DC', 'District of Columbia'), |
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 ctypes | |
| import time | |
| import shutil | |
| import requests | |
| def set_desktop(): | |
| SPI_SETDESKTOPWALLPAPER = 20 | |
| try: |