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
... | |
... | |
dependencies { | |
... | |
... | |
implementation("software.amazon.awssdk:dynamodb-enhanced") | |
} | |
dependencyManagement { |
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 software.amazon.awssdk.services.dynamodb.DynamoDbAsyncClient | |
import software.amazon.awssdk.services.dynamodb.model.* | |
import java.util.concurrent.CompletableFuture | |
class CustomerRepo(private val client: DynamoDbAsyncClient, | |
private val customerTableName: String) { | |
fun saveCustomer(customer: CustomerPersist): CompletableFuture<PutItemResponse> { | |
val putItemRequest = PutItemRequest.builder() | |
.item( |
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 | |
from typing import List | |
import pandas as pd | |
from pandas import DataFrame | |
from requests import Response | |
from googl import Googl | |
from zoom import Zoom |
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 typing import List | |
from google.oauth2 import service_account | |
from googleapiclient import discovery | |
from pandas import DataFrame | |
class Googl: | |
def __init__(self, service_account_file: str, scopes: List[str]): | |
self.service_account_file = service_account_file |
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 time | |
from typing import Optional, Dict, Union, Any | |
import requests | |
from authlib.jose import jwt | |
from requests import Response | |
class Zoom: | |
def __init__(self, api_key: str, api_secret: str): |
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
requests==2.23.0 | |
Authlib==0.14.1 | |
pandas==1.0.3 | |
google-api-python-client==1.8.0 |
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 csv | |
def download_sheet_to_csv(sheets_instance, spreadsheet_id, sheet_name): | |
result = sheets_instance.spreadsheets().values().get(spreadsheetId=spreadsheet_id, range=sheet_name).execute() | |
output_file = f'{sheet_name}.csv' | |
with open(output_file, 'w') as f: | |
writer = csv.writer(f) | |
writer.writerows(result.get('values')) |
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 googleapiclient import errors | |
def get_spreadsheet_id(api_service, spreadsheet_name): | |
results = [] | |
page_token = None | |
while True: | |
try: | |
param = {'q': 'mimeType="application/vnd.google-apps.spreadsheet"'} |
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 googleapiclient import discovery | |
from httplib2 import Http | |
from oauth2client import file, client, tools | |
def get_api_services(): | |
# define credentials and client secret file paths | |
credentials_file_path = './credentials/credentials.json' | |
clientsecret_file_path = './credentials/client_secret.json' |
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
#!/usr/bin/env python | |
import json | |
import uuid | |
from confluent_kafka.avro import AvroProducer | |
from utils.load_avro_schema_from_file import load_avro_schema_from_file | |
from utils.parse_command_line_args import parse_command_line_args |