Why would the Amazon Mechanical Turk Web Interface be out of sync with the API? - mechanicalturk

I've been using the rturk Ruby library to call the Amazon Mechanical Turk API. I'm doing basic things like approving and rejecting. After doing so successfully, I am now looking over the (a) AMT Web UI and (b) an exported CSV. Neither shows the approvals or rejections I just made.
What is going on?
I would not expect a time lag. How can I get to the bottom of this?

I got an answer from James#AWS over at the Mechanical Turk forum: https://forums.aws.amazon.com/message.jspa?messageID=398300
Please see the last response in this thread:
https://forums.aws.amazon.com/thread.jspa?messageID=175067&#175067
The short answer is that the web interface doesn't see updates from certain actions taken in the API. This is a known limitation.
From where I sit, this "known limitation" would be better described as a bug.

Related

Amazon Mechanical Turk: Created a Job using website UI, but would like to accept/reject jobs using the Python API

I created a data collection Job (HITs) using the mechanical turk website.
I would like to reject/approve jobs using python API, because that would accelerate the process.
I can approve the process using the python API, but that doesn't update the Assignment status on the website. Does anyone have any idea on this?
Thanks.
Unfortunately, HITs created through the website are not visible or manageable in the UI (and vice-versa). So, that's why you can't see or operate on them via API calls. You'll need to create the HITs
You can reuse the layouts created in the website, though. Check out this article: https://blog.mturk.com/tutorial-using-the-mturk-requester-website-together-with-python-and-boto-4a7ef0264b7e

Can you work on your own Mechanical Turk task without getting paid (and without paying Amazon)?

Is it possible to work on your own Mechanical Turk task without getting paid, and thus without paying Amazon (to avoid the ~20% fee) ? I would like to crowdsource my task while still being able to work on it in my free time.
Technically, you can deploy a copy of your project to Amazon Mechanical Turk Developer Sandbox, and work on it at Worker Sandbox for free.
However, you do need to pay attention to the guidelines and policies of these sandbox sites. The only banned actions I can find so far are:
Load or performance testing your MTurk application using the MTurk Developer Sandbox is not allowed. If you have a special need, please contact us here to specify your special circumstance. You will be contacted by a member of our team to discuss your requirements.
Therefore, I assume that as long as you don't spam the sandbox sites with bots or a large number of workers, it should be fine to work on your own project personally.
You might still need to confirm with MTurk Support though.

What is the most efficient way to automate your Instagram?

Over the past few weeks, I've spent some time researching about Instagram automation the goal being to have a program that can like and comment for me. I've come up with the following solutions:
Use a browser automation library like selenium to navigate through Instagram's website.
Cons: really botchy code that becomes useless as soon as Instagram renames their css classes which they do from time to time
Have a Android emulator running and automate that.
Cons: every instance of that emulator would require like 2 gigs of storage and would be really inefficient.
So how do for example apps on the play-/app store do it? They only have the small processing power of the phone available and still run effortless in the background.
Is there another solution that I'm missing?
The most efficient way to automate Instagram is to use the Instagram API. Using that API you can publish photos with users, tags and locations [1]. I don't find any immediate mention of Stories etc., but most likely if you work more with the API you find where/how to do that.
The also linked Instagram Platform API seems to be in a state of discontinuation.
As you tagged your question "Selenium", no, Selenium does not provide a reasonable approach for interfacing with Instagram as Selenium provides no way to make POST requests. You could try to automate the website through Selenium, but using the API is far more straightforward, less prone to layout changes and the officially sanctioned way.
[1] https://developers.facebook.com/docs/instagram-api/content-publishing
The way I did it at the end was that I used the Instagram Private API for Instagram on GitHub:
https://github.com/ping/instagram_private_api
That way I didn't have to emulate an entire device actually browsing through Instagram.

Running MTurk HITs on external website

I am implementing a website on which the recruited MTurk workers will perform tasks. I plan to recruit workers using MTurk tasks, using which I will redirect them to an external website for actual work. I have the following questions relating to this plan.
Is there any foreseeable problems with this approach of running HITs? If so, how can we mitigate them?
how should I implement the authentication procedure on my external site? For example, how can I make sure the people who come to the website to perform a specific task are indeed the same group of people recruited earlier for this particular task on MTurk?
when the workers finish the task, how should I integrate the payment procedure with MTurk based on their performance? For example, say worker is owed $3 after finishing the task on my external site, is it possible for me to tell MTurk to pay him/her this amount programmatically?
The external site will be built using Python, if such detail matters.
Any suggestions and comments based on your experiences and insights in using MTurk would be much appreciated!
I am thinking through this for a similar project of mine. I've experimented as a worker myself. Here is my plan, I hope it is of use to you. (I have not implemented it yet. It is based on an academic HIT I participated in as a worker.) Here goes:
A. Create a template that has language something like:
1. Please open this web site in a new browser window:
http://your-url.xyz.blah/tasks/${token}
2. Read and follow the instructions there.
3. After completing the task, you will receive a confirmation code. Paste
it here: [________]
B. Create some random tokens for your Mechnical Turk data file:
1A1B43B327015141
09F49F2D47823E0C
B5C49A18B3DB56F4
4E93BB63B0938728
CCE7FA60BFEB3198
...
(Generate these tokens from your app; it needs to cross-reference them.)
C. Your app extracts the token from URL, looks up the task, and does whatever it needs to do. I personally don't worry about people stumbling onto a URL, since it is a one-time use token.
D. After a user completes the task on the external web site, the external app gives a confirmation code. The confirmation code should be random and opaque. Only your application will know if any particular code corresponds to a correct or incorrect answer. In fact, if you want, the correctness may not even be determined in real time -- it could be the result of an aggregation and/or comparison across multiple submissions.
E. Write some code to interact programmatically. Take the token and confirmation code supplied from the MTurk result and make sure they match with your external app. If they don't match, reject the HIT. If they match, check the correctness in your external app and approve or reject. You might consider a bonus pay structure.
So, to answer your particular questions:
I don't anticipate problems with the approach I described. That said, Mechanical Turk is both an art and a science. Perhaps more art. Writing good questions and paying Turkers appropriately is something you have to figure out with a combination of common sense, market research, and experimentation.
See (C) above. A token is designed to only be used once. Use long enough tokens and the probability of collision becomes very low.
See (E) above. The Mechanical Turk Developer Guide is a good place to start.
Please share your results back. Or have the Turkers send StackOverflow hundreds of postcards. :)
Notes:
I'm currently exploring qualification tests. I suspect they can be very useful.
I want to get a Turker's Worker ID in my external application, but I haven't figured that part out yet. I'm reading up on it; for example: Getting workerId by assignmentId
I am thinking about using the ExternalQuestion feature from the API: "... you can host the questions on your own web site using an "external" question. ... A HIT with an external question displays a web page from your web site in a frame in the Worker's web browser. Your web page displays a form for the Worker to fill out and submit. The Worker submits results using your form, and your form submits the results back to Mechanical Turk. Using your web site to display the form gives your web site control over how the question appears and how answers are collected."
You might also find PsiTurk to be useful: "PsiTurk is an open platform for conducting custom behvioral experiments on Amazon's Mechanical Turk. ... It is intended to provide most of the backend machinery necessary to run your experiment. It uses AMT's External Question HIT type, meaning that you can collect data using any website. As long as you can turn your experiment into a website, you can run it with PsiTurk!"

How To Get Started Working with the Google AdWords API?

I'm a student working on a project related to SEO; I need to write an optimization tool, so I'm writing an application using C# and Windows Forms. The main part of the application is for keyword selection, and I want to use the Google AdWords API to obtain a list of keywords.
I downloaded the C# client library, but can't understand how to set up the project: I am getting the error:
"An API exception has occurred. See ApiExecption and InnerException fields for more details".
Maybe I have made a mistake when I edited the App.config file as I haven't changed anything else. Can anyone advise me where I should begin? I would be grateful to hear your ideas.
Unfortunatley, the AdWords API isn't as open as you might think: It's meant for ad agencies managing large accounts, or software vendors who want to build ad management platforms. You need to apply to Google for an API key to gain access; they used to give them out to nearly anyone with an account, and it took about 14 days to process the application. However, Google has got very strict about their terms and conditions over the past 12 months, and to put it simply, you probably won't meet them if you're building an SEO tool; even if you apply to build a full platform, you'll need to wait six to ten weeks for approval as they've got a huge backlog of applications to process at the moment.
As this is just a student project, you should actually be able to get away with just using the AdWords API sandbox, which is open to anyone with a Google account. This won't give you real keywords or stats, but would demonstrate your understanding of the platform.
Another option would be to check out the Ad Intelligence Service of the adCenter API; you'd still need to open an adCenter account (with a $5 activation fee), but you should be able to get an adCenter API key without waiting too long. The stats available from Microsoft won't be as extensive as what Google has to offer, but will still be relevant to the at least the US market. Also, being Microsoft, they've got a good range of C# examples.
You could use the sandbox, but it is good only for testing purposes. You won't get real values for traffic estimation and keyword ideas.
To use the sandbox, what you need is a Google account (your gmail account for instance). To initialize the sandbox,
In your App.config, put email/password/developerToken as your email / your password / youremail++USD (e.g. john.doe#gmail.com++USD)
Run the GetCampaigns.cs code example. It is under v201109/BasicOperations folder in the C# examples project. This will initialize the sandbox.
Run the GetAccountHierarchy.cs code example. It is under v201109/AccountManagement folder. This will give you 5 client emails and their customer ids.
Use one of these customerIds in the ClientCustomerId field of App.config.
Run any other code example.
The video is a bit outdated, due to recent changes in AdWords API, I need to update it.
you can find a very good article series about adwords api there: Google Adwords API
it is not that hard to learn how to use it! I think the API itself is very good documented and there is a good suppo from google.