Skip to content

Instantly share code, notes, and snippets.

View teehamaral's full-sized avatar

Teeh Amaral teehamaral

  • Arapiraca - Brazil
View GitHub Profile
import string
import random
import os
import sys
import time
from temba_client.v1 import TembaClient
def get_output_file_name(output_directory):
return '%s/%s.vcf' % (output_directory, time.time())
import os
import sys
import json
def get_output_file_name(path):
current_file_name = path.split('/')[-1]
return '%s.json' % current_file_name.split('.')[0]
file = sys.argv[1]
import boto3
s3 = boto3.client('s3',
aws_access_key_id=settings.AWS_ACCESS_KEY_ID,
aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY
)
url = s3.generate_presigned_url(
'get_object',
Params={'Bucket': default_storage.bucket.name, 'Key': default_storage._encode_name(path)},
ExpiresIn=3600,
# Install RapidPRO Python to use this script: pip install rapidpro-python
import json
from collections import defaultdict
from temba_client.v1 import TembaClient as TembaClient_v1
from temba_client.v2 import TembaClient as TembaClient_v2
__author__ = 'teehamaral'

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text