-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfill_dynamodb_data.py
More file actions
112 lines (97 loc) · 4.06 KB
/
fill_dynamodb_data.py
File metadata and controls
112 lines (97 loc) · 4.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Developer
# Email PRIMARY KEY str
# Name str
# Password str
# Description varchar 100 (why i want to invest)
# Location (N, S)
# Social Media (list(linkedin, instagram))
# Preferences (distance from property/investor (calculated using Py), investment amount min)
# Swipes (set[PROPERTY ID])
# /
# Properties (list[PROPERTY ID])
# functions to implement:
# 1. get property list that match investor preferences
# 2. get investors that match property preferences
# 3. get relevant investor/property & developer data for swipe
# 4. get relevant investor/property & developer data for chat
# 5. add investor swipe to property
# 6. add property swipe to investor
# for the photos, just add them in AWS bucket with name = email
# Property
# Property ID (generate)
# Property Name
# Preferences (investment amnt min, distance from property) - every property will have separate matches and chats
# Swipes (list[INVESTORS])
# Developer email of property
file = open('abc.txt', 'r')
newline_count = upper_count = 0
for line in file.readlines():
if line[-1] == '\n':
newline_count += 1
for char in line:
if char.isupper():
upper_count += 1
file.close()
print(f"Newline Count: {newline_count}, Upper Count {upper_count}")
# when investor swipes on property, we check if that developer's property owner has swiped on the investor
# if yes, match
# if no, add to property's matches list
# developer chooses one of their property listings, and then proceeds to tinder-like site
# when property (of developer) swipes on investor, we check if that investor has swiped on that property
# if yes, match
# if no, add to investor's matches list
# investors matches has properties, we can get property owner from that
# properties matches has investors, and developers can access all of their property information
# items_to_insert = [
# {
# 'Email': 'johndoe@example.com',
# 'Name': 'John Doe',
# 'Password': 'password123',
# 'Description': 'A real estate enthusiast, looking for small-scale investment opportunities!',
# 'Preferences': ['50 miles', 'Small', 'Residential House'],
# 'Location': [32.7767, -96.7970],
# 'Social_Media': ['https://www.linkedin.com/in/johndoe/', '@johndoe_instagram'],
# 'Property_Listings': [1, 2],
# },
# {
# 'Email': 'alice@example.com',
# 'Name': 'Alice Smith',
# 'Password': 'securepwd321',
# 'Description': 'A property investor looking for new opportunities',
# 'Preferences': ['10 miles', 'S', 'RA'],
# 'Location': [Decimal('32.7555'), Decimal('-97.3308')],
# 'Social_Media': ['https://www.linkedin.com/in/alice_smith/', '@alice_instagram'],
# 'Property_Listings': [3],
# },
# {
# 'Email': 'mark@example.com',
# 'Name': 'Mark Johnson',
# 'Password': 'mysecretpass',
# 'Description': 'A first-time homebuyer with a budget',
# 'Preferences': ['3 miles', 'S', 'RH'],
# 'Location': [Decimal('32.5949'), Decimal('-96.9529')],
# 'Social_Media': ['https://www.linkedin.com/in/mark_johnson/', '@mark_instagram'],
# 'Property_Listings': [4, 5, 6],
# },
# {
# 'Email': 'emily@example.com',
# 'Name': 'Emily Davis',
# 'Password': 'emilyspass',
# 'Description': 'Experienced realtor specializing in commercial properties',
# 'Preferences': ['7 miles', 'C', 'C'],
# 'Location': [Decimal('32.9866'), Decimal('-96.8236')],
# 'Social_Media': ['https://www.linkedin.com/in/emily_davis/', '@emily_instagram']
# },
# {
# 'Email': 'sam@example.com',
# 'Name': 'Sam Green',
# 'Password': 'sampassword123',
# 'Description': 'Seeking an industrial space for a new venture',
# 'Preferences': ['15 miles', 'C', 'I'],
# 'Location': [Decimal('32.8364'), Decimal('-97.1457')],
# 'Social_Media': ['https://www.linkedin.com/in/sam_green/', '@sam_instagram']
# }
# ]
# with table.batch_writer() as batch:
# for item in items_to_insert:
# batch.put_item(Item=item)