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 re | |
from pymongo import MongoClient | |
from settings import DEST_DATABASE_URL | |
if __name__ == '__main__': | |
with open("CREDENTIALS") as f: | |
credentials = f.read().strip() |
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 io | |
import time | |
from gzip import GzipFile | |
import pandas as pd | |
# https://stackoverflow.com/a/20260030/496852 | |
def iterable_to_stream(iterable, buffer_size=io.DEFAULT_BUFFER_SIZE): | |
""" |
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
## Exercise | |
You are tasked with creating a UI that allows user to filter and view a company dataset, with the following requirements. | |
1. The app is a React app based on the structure of https://github.com/react-boilerplate/react-boilerplate. | |
2. The app connects to an HTTP API: | |
https://faker-companies.dk-dev.leadbook.com/api/v1/industries/ | |
https://faker-companies.dk-dev.leadbook.com/api/v1/companies/ | |
https://faker-companies.dk-dev.leadbook.com/api/v1/companies/?company_location=BA |
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 logging | |
from enum import IntEnum | |
from datetime import datetime | |
from typing import List, Iterable, Dict, Any, Tuple, Literal, NamedTuple, Type | |
import tenacity as tn | |
from elasticsearch.helpers import parallel_bulk | |
from app.elasticsearch.client import es_client | |
from app.db.models import BaseModel |
OlderNewer