Multiple hits in on page in MTurk - text

In Mturk, we want to show a set of tweets, e.g., 20 tweets, in boxes in one page. Then, Workers click JUST on the tweets (boxes) that are relevant to a specific concept like "entrepreneurship". For example for 3 tweets:
Tweet 1: Money and supporting customers are essential for a business
Tweet 2: I like tennis
Tweet 3: I spend my invest for buying my home.
Tweets should be shown in boxes and Workers should just click on Tweet 1 (instead of clicking on Yes or No buttons) and MTurk returns the results in a file (like csv format) in this way:
Yes (or 1)
No (or 0)
No (or 0)
We want to show multiple tweets (multiple hits) in one page.
How can we create a code so that for a batch of tweets, MTurk reads 20 tweets from the batch and puts them in their place for the Workers?
Is there such design? If yes, would you please guide me how I can do it? With many thanks. Jafar

All 20 tweets would be required to be part of the same HIT. There's no way to create one HIT per tweet, then have Mechanical Turk display 20 of them as one task for a worker to complete.

Related

How to handle pagination with results filtered AFTER obtaining them from the DB?

Running into an issue where say I have a paginated result set always delivering 10 items per page (or less if there's no more left in DB), I've noticed that certain pages (eg: page 2 of 20 or page 5 of 74, etc.) sometimes contains less than 10. After diving into the code, yes we do skip/takes but there's also a bit of post processing afterwards where it hits 3rd party APIs and depending on the result, will filter the items out. This could lead to certain pages having 3 items instead of 10. How does one take into account post filtering during pagination? Is that even a thing?

Fast post/comment extraction from instagram profiles using instaloader

I'm using instaloader to automatically grab the posts and comments of 50 big instagram profiles (over 8K posts and thousands of comments). I'm looking to update each profile every 30 mins, meaning that I want to grab all new posts and comments (these could be of the new posts or old ones). instaloader successfully allows me to grab this information but it takes a long time to grab all posts/comments, as I have to download all of this information every 30 minutes (download more than 7K posts). For example, downloading the posts/comments for a single profile with over 7K posts can take up to more than 1 or two hours.
Using instaloader, is there a way to download only the posts/comments which are new? Perhaps through HTTP etags that contain a hash for each post?
Is there any alternative to downloading all posts/comments quickly (let's say 1 minute)? For example, through the IG API directly or other third party APIs (https://github.com/dilame/instagram-private-api)?

How to create a survey list in SharePoint which accepts limited responses?

I am trying to create a survey list in SharePoint which accepts a limited number of responses. Suppose, if 1000 persons submitted their responses, then the next , i.e. 1001 th person should get a message "The maximum limit reached. Your responses cannot be submitted right now.". Can anybody please tell me how to do this?
If it were me I would still want that information even if the user submitted after the first 1000. I would still pull down a report for the first 1000 responses but then you still have access to the extra data if need be. If its a requirement to cap the list at 1000 see this article (https://sharepoint.stackexchange.com/questions/136244/max-number-of-items-in-a-sharepoint-list)

Getting Multiple Last Price Quotes from Interactive Brokers's API

I have a question regarding the Python API of Interactive Brokers.
Can multiple asset and stock contracts be passed into reqMktData() function and obtain the last prices? (I can set the snapshots = TRUE in reqMktData to get the last price. You can assume that I have subscribed to the appropriate data services.)
To put things in perspective, this is what I am trying to do:
1) Call reqMktData, get last prices for multiple assets.
2) Feed the data into my prediction engine, and do something
3) Go to step 1.
When I contacted Interactive Brokers, they said:
"Only one contract can be passed to reqMktData() at one time, so there is no bulk request feature in requesting real time data."
Obviously one way to get around this is to do a loop but this is too slow. Another way to do this is through multithreading but this is a lot of work plus I can't afford the extra expense of a new computer. I am not interested in either one.
Any suggestions?
You can only specify 1 contract in each reqMktData call. There is no choice but to use a loop of some type. The speed shouldn't be an issue as you can make up to 50 requests per second, maybe even more for snapshots.
The speed issue could be that you want too much data (> 50/s) or you're using an old version of the IB python api, check in connection.py for lock.acquire, I've deleted all of them. Also, if there has been no trade for >10 seconds, IB will wait for a trade before sending a snapshot. Test with active symbols.
However, what you should do is request live streaming data by setting snapshot to false and just keep track of the last price in the stream. You can stream up to 100 tickers with the default minimums. You keep them separate by using unique ticker ids.

duplicate jobs in sun grid engine

When I run qacct with the job ID, after it is finished, I get two results,
the one I run and an older job with the same jobid.
how can I delete the history of qacct?
Any one know how to solve this?
Thanks
Tsvi
Grid Endine (or SGE) has job IDs in the range 0..99999. This may roll over quickly in some clusters and people may be interested in finding statistics of older jobs with the same ID. You can identify your jobs knowing also the approximate submit time.
Anyway if you want to eliminate the duplicate job IDs from qacct you can rotate the accounting file (//common/accounting) using utilities like logchecker.sh.
Check the man page or this grid engine online documentation:
http://gridscheduler.sourceforge.net/howto/rotatelogs.html

Resources