I have a gz format file. The file is very big and the first line is as follow:
{"originaltitle":"Leasing Specialist - WPM Real Estate Management","workexperiences":[{"company":"Home Properties","country":"US","customizeddaterange":"","daterange":{"displaydaterange":"","startdate":null,"enddate":null},"description":"Responsibilities: Inspect tour routes, models and show apartments daily to ensure cleanliness. Greeting prospective residents; determining the needs and preferences of the prospect and professionally present specific apartments while providing information regarding features and benefits. Answering incoming calls in a cheerful and professional manner. Handle each call accordingly whether it is a prospect call or an irate resident that just moved in. Develop and maintain Resident relations through the courtesy of on-site personnel, promptness of maintenance calls, and knowledge of community policies. Learn to develop professional sales and closing techniques. Accompany prospects to model apartments and discusses size and layout of rooms, available facilities, such as swimming pool and saunas, location of shopping centers, services available, and terms of lease. Demonstrate thorough knowledge and use of lead tracking system. Make follow-up calls to prospective Residents who did not fill out an application. Compile and update listings of available rental units.","location":"Baltimore, MD","normalizedtitle":"leasing specialist","title":"Leasing Specialist"},{"company":"WPM Real Estate Management","country":"US","customizeddaterange":"1 year, 3 months","daterange":{"displaydaterange":"July 2017 to October 2018","startdate":{"displaydate":"July 2017","granularity":"MONTH","isodate":{"date":null}},"enddate":{"displaydate":"October 2018","granularity":"MONTH","isodate":{"date":null}}},"description":"Responsibilities: Inspect tour routes, models and show apartments daily to ensure cleanliness. Greeting prospective residents; determining the needs and preferences of the prospect and professionally present specific apartments while providing information regarding features and benefits. Answering incoming calls in a cheerful and professional manner. Handle each call accordingly whether it is a prospect call or an irate resident that just moved in. Develop and maintain Resident relations through the courtesy of on-site personnel, promptness of maintenance calls, and knowledge of community policies. Learn to develop professional sales and closing techniques. Accompany prospects to model apartments and discusses size and layout of rooms, available facilities, such as swimming pool and saunas, location of shopping centers, services available, and terms of lease. Demonstrate thorough knowledge and use of lead tracking system. Make follow-up calls to prospective Residents who did not fill out an application. Compile and update listings of available rental units.","location":"Baltimore, MD","normalizedtitle":"leasing specialist","title":"Leasing Specialist"},{"company":"Westminster Management","country":"US","customizeddaterange":"1 year","daterange":{"displaydaterange":"June 2016 to June 2017","startdate":{"displaydate":"June 2016","granularity":"MONTH","isodate":{"date":null}},"enddate":{"displaydate":"June 2017","granularity":"MONTH","isodate":{"date":null}}},"description":"Responsibilities: Tour vacant units and model with future prospects.Process applications. Answer emails and incoming phone calls. Prepare lease agreement for signing. Collect all monies that is due on dateof move-in. Enter resident repair orders for resident. Walk vacant units to ensure that the unit is ready for show. Complete residency and employment verifications. Income qualify all applicants.","location":"Baltimore, MD","normalizedtitle":"leasing consultant","title":"Leasing Consultant"},{"company":"MARYLAND MANAGEMENT COMPANY","country":"US","customizeddaterange":"1 year, 1 month","daterange":{"displaydaterange":"April 2015 to May 2016","startdate":{"displaydate":"April 2015","granularity":"MONTH","isodate":{"date":null}},"enddate":{"displaydate":"May 2016","granularity":"MONTH","isodate":{"date":null}}},"description":"Responsibilities: Lease apartments, sign lease agreements, complete residence maintenance repairrequest, answer phones, customer service, processed prospects applications, opened and closedinventory, responded to Level One emails Accomplishments: I was able to successfully finish FairHousing requirements. The first month I was able to properly and accurately process a application and move-in documents. Skills Used: The skills I used while at Americana were strong team work, strongcommunication, interpersonal, and leadership.","location":"Glen Burnie, MD","normalizedtitle":"leasing agent","title":"Leasing Agent"},{"company":"Amazon.com","country":"US","customizeddaterange":"1 year, 5 months","daterange":{"displaydaterange":"September 2014 to February 2016","startdate":{"displaydate":"September 2014","granularity":"MONTH","isodate":{"date":null}},"enddate":{"displaydate":"February 2016","granularity":"MONTH","isodate":{"date":null}}},"description":"Responsibilities: I assure customers are receiving the correct merchandise in a timely fashion.And evaluate inventoryAccomplishments:I exceeded Amazon expectations of receiving 2800 items per hour, which allowed me to train otherassociates, building confidence and skills.Skills Used:The skills i used while performing my task were strong leadership, strong communications, and beingdetailed orientated.","location":"Baltimore, MD","normalizedtitle":"customer service representative","title":"Customer Service Representative"},{"company":"Carmax Superstore","country":"US","customizeddaterange":"1 year, 2 months","daterange":{"displaydaterange":"February 2014 to April 2015","startdate":{"displaydate":"February 2014","granularity":"MONTH","isodate":{"date":null}},"enddate":{"displaydate":"April 2015","granularity":"MONTH","isodate":{"date":null}}},"description":"Responsibilities:Greet customersSearch for the right vehicle that best suits the customers needs and wantsSubmit financial applicationsAssist customer with the purchasing process and document signingEnter customers information for appraisal offerAssist customer with purchasing Car Max extended warrantiesConducted follow- up on a daily, weekly, and monthy basisAccomplishments:I was acknowledged by the district for having 100% in Car Max extended warranties. Also I wasacknowledged by the district for having one of the highest Voice Of Customer survey scores. I passedthe 6 week training, obtaining my sales licenseSkills Used:I demonstrate strong communication, interpersonal and listening skills. I also have strongorganizational skills.","location":"Nottingham, MD","normalizedtitle":"sales consultant","title":"Certified Sales Consultant"},{"company":"rue21","country":"US","customizeddaterange":"1 year, 8 months","daterange":{"displaydaterange":"June 2011 to February 2013","startdate":{"displaydate":"June 2011","granularity":"MONTH","isodate":{"date":null}},"enddate":{"displaydate":"February 2013","granularity":"MONTH","isodate":{"date":null}}},"description":"Responsibilities: Managed profit goals on a daily basisCustomer ServiceReceived Incoming shipmentDelivered daily bank depsoitsMaintained store appearanceOverlooked sales associates performanceCreated daily goals for each sales associateAccomplishments:The impact that I was able to have during my time at Rue21, I was able to build a strong team of individuals who were scored top in the region for Customer Service.Skills Used:I demonstrated strong leadership and verbal communication.","location":"Dundalk, MD","normalizedtitle":"assistant store manager","title":"Assistant Store Manager"},{"company":"Shaws Jewelers","country":"US","customizeddaterange":"1 year, 5 months","daterange":{"displaydaterange":"November 2009 to April 2011","startdate":{"displaydate":"November 2009","granularity":"MONTH","isodate":{"date":null}},"enddate":{"displaydate":"April 2011","granularity":"MONTH","isodate":{"date":null}}},"description":"Responsibilities: Customer serviceGeneral office( typing, faxing, )Made outgoing calls to valued customersCleaned and maintained show cases and lunch roomPrepared jewlery repair tickets for outgoing shipmentAccomplishments:During my time at Shaws Jewelers I was able to demonstrate excellent customer service.Also I wasable to achieve personal profit goals and credit application goals on a daily basis. I was acknowledged and rewarded by my DM for excellent team participation and over achieving the 6 standards on a dailybasis.Skills Used:I demonstrated strong verbal and listening skills. Also I have excellent interpersonal skills.","location":"Dundalk, MD","normalizedtitle":"sales associate","title":"Sales Associate"}],"skillslist":[{"monthsofexperience":0,"text":"yardi"},{"monthsofexperience":0,"text":"marketing"},{"monthsofexperience":0,"text":"outlook"},{"monthsofexperience":0,"text":"receptionist"},{"monthsofexperience":0,"text":"management"}],"url":"/r/Lashannon-Felton/1062d3b8cbb13886","additionalinfo":""}\n'
I am not familiar with gzip.GzipFile format.
Is there a way to make it a dictionary?
You will want to make use of the json module and the gzip module in Python, both of which are part of the Python Standard Library.
The gzip module provides the GzipFile class, as well as the open(),
compress() and decompress() convenience functions. The GzipFile class
reads and writes gzip-format files, automatically compressing or
decompressing the data so that it looks like an ordinary file object.
To read the compressed file, you can call gzip.open().
Opening the file with the default rb mode, will return a gzip.GzipFile object, from which you can obtain a bytes-like object by calling read().
Then, using json.loads(), you can convert the raw data into a usable Python object -- a dictionary.
The snippet below is a simple demonstration of this in action:
import gzip
import json
with gzip.open('gzipped_file.json.gz', 'rb') as f:
raw_json = f.read()
data = json.loads(raw_json)
print(type(data))
# Prints <class 'dict'>
print(data)
# Prints {'originaltitle': 'Leasing Specialist - WPM Real Estate Management', 'workexperience ...
print(data['workexperiences'][0]['company'])
# Prints Home Properties
I'm trying to create a platform with multiple functionalities, and one of them is a crowfunding of projects, in which the users can post a project and ask for funds. (like kickstarter or indiegogo).
I'm working with Django 2.0, Python 3.6 and PostgreSQL and I want to use Stripe for payments. I also read a bunch of the Stripe's API Documentation, and I have some ideas for doing this, but this will be my first API implementation so I would like to do it well (more even talking about payment systems).
The main question is: How can I do that multiple users realize payments to another for one project ONLY when the goals of that project are reached?
What I think that is the better is to use (Stripe Connect) Express/Custom Accounts to create an account for each user that posts a Project, so I can redirect all the payments to that account.
The thing is that I also want to apply a fee for my platform.
And I don't know exactly how can I do this. I imagine that Stripe give an option for that to evade doing two transactions in my own backend (one for the project's user and another for the platform (me).
Then I have another related problem that is when should I do the transactions?
I have to asure the 100% of the transactions, but also that the project get the funds only when it reach the goals, So I don't know if with Stripe I can freeze all the funds and then give it to the project or refund it depending on the state of the project goals.
As an alternative comes to my mind to put all the funds to an a sub-bank account of my own platform and then if the project reach the funds, do the transaction to the user's account; or if the project fails, make a full refund. The problem I see here is that if the project succeed, Stripe get's x2 times a transaction commission, and if the project fails, I (my platform) have to pay for my own the first transaction's Stripe commission. So this is not t.he correct answer at all.
Kickstarter (as a main example) only do the transaction when the
project reach the funding goals, but doing that, they can (and
usually) get some failed transactions. This is what I cannot accept in
my platform.
To sum up, I want be able to make that an user can pay to another only when the project goals are reached, get a commission for it and asure that the 100% of the transactions are accepted.
I would like to ask for help in the coding (or tips at least) because I also read the documentation of dj-stripe and pinax-stripe, but I don't see the way of doing what I need because their documentation is based on simple payments always to the same user and for subscriptions.
I think that maybe the best option is to use the python api given by Stripe.
I also searched a lot for this and found the following things: Crowdao, a project with stripe integrated for crowdfunding BUT is only for one project, so it doesn't solve the problem; A way of doing AHC with Django-allauth and Stripe, but I don't see exactly how they do that, and I want to use more payment systems too, so I imagine it doesn't fit as a good answer for my problem.
If you need any extra information please ask for it, I'll do whatever I can. Thank you very much.
You could use stripe connect and when creating the charge use authorize-only (Note: Max 7 days)
As #Oscar has suggested, connect[0] is the way to go.
So basically yourself will registered as a platform account and each projects will be registered as connected account, most likely custom/express type[1]. Your end user accounts who is contributing to each projects will live in your main platform account.
There are many ways to achieve your goal by charging the customer when goal is met. but One way is that So you can do a Destination Charge [2] and a Manual Payout[3].
Basically
In Destination charge, you charge the user $100 and transfer $80 to the connected project account; so you keep $20 as a fee;
The $80 sits on the project stripe account's balance which is not paid out to their bank account.
If the goal reaches, you trigger a manual payout to the project so that the project actually get the $80 dollars
If not, you will need to perform on refund[4] on all the transactions on that project.
That's it.
Take note the manual payout only hold for 90 days, after that it moves out directly
Your account will bear all the fees to Stripe for transactions which you can recover from your application fee ($20) on the project.
But the refund will cost you as there will be no fee earned but still payable to Stripe.
Hope it helps.
0 connect
1 accounts
2 Destination Charge
3 Manual Payouts
4 Refund
I'm trying to integrate balanced payments API into my work. I've looked at Docs and other concerned forums also but didn't get clear my doubts.
I understand the flow of this though, but due to some method names i'm getting confused.
e.g. customer.
https://docs.balancedpayments.com/1.0/overview/getting-started/#charge-a-credit-card
What have I tried till now:(in Python)
I've created a dummy/Test bank and it's working fine.
bank_account = balanced.BankAccount(...) but I dont know how much could I debit from this or first do I have to credit into.
after this I created a card and then I created a customer customer = balanced.Customer().save()
and then associated the card with the customer customer.add_card('/v1/marketplaces/TEST-MP52IlCmywk6hGbgS75QSlN/cards/CC3AiMy0KEP1PhwnffMk32RF')
but how is this statement working?
customer.add_bank_account('/v1/bank_accounts/BA24Zc2jo1moflunJDxKrCrB')
I'm slightly confused with this customer word.
Could somebody please explain this from beginning in simple steps.
Customers are objects that represent businesses or people within your marketplace (i.e. buyers and sellers). In this revision of the API, funding instruments (e.g. credit cards, bank accounts) must be associated to a specific customer object before you can initiate any transactions.
The method you listed:
customer.add_bank_account('/v1/bank_accounts/BA24Zc2jo1moflunJDxKrCrB')
Is associating the bank account to the customer object that you created.
You specify the amount for a debit (charge) or credit (payout). The limit depends on a number of factors (e.g. credit limit, available funds, transaction limits)
Does anyone know if there is an API for Oneworld Alliance ? The idea is to program in Python a Traveling Salesman, who visits all airports in the system based on actual available flight connections.
I don't think Oneworld Alliance themselves, or other airlines or alliances, have their own APIs. Not sure whether asking this is ontopic to SO.
Try the search engines and booking sites: Travelocity, Expedia, Hotwire, cheaptickets...
For example by Google here's Expedia Affiliate Network.
Kayak apparently used to have a beta API but it was pulled due to misuse.
Not sure how easy it is to scrape Oneworld's site or timetables, I wouldn't start there.
Remember the airlines have a negative incentive to allow their data to be scraped, whereas the search engines have a positive incentive (within reasonable limits). So start with the latter.
When you say "based on actual available flight connections", I presume you just check whether airline X has a route connecting city A to city B, not at actual seat inventory on specific dates and times, which seems needless. Do you need durations and frequencies?
Btw, there are 900 hits on SO on "Traveling Salesman", you might be able to reuse someone else's data.