Data collection from twitter with twarc2 and limitation - twitter

I want to collect some data from Twitter with twarc2. I want to collect the data between specific duration and limit the collection to a daily basis.
For example, between the 1st of July to the 10th of July, limit the collected tweets to 100 tweets per day. Is it possible to do it once, or should I execute the code 10 times?

I am not aware of a way to run this in one command. One solution I would suggest is to write a bash script that contains all of the individual twarc2 calls. Then you can call that script only once.
For example, you could create a bash script called ten_queries.sh that looks like the below:
#!/bin/bash
twarc2 search --start-time 2022-09-16T00:00:00 --end-time 2022-09-17T00:00:00 blacklivesmatter 2022-09-16_tweets.jsonl
twarc2 search --start-time 2022-09-17T00:00:00 --end-time 2022-09-18T00:00:00 blacklivesmatter 2022-09-17_tweets.jsonl
...
And then just add a line for each day.

Related

How to get power charts and reports for tfs

I want to get some different reports and charts from Tfs activities and history (most based on task tags and assigned users). for example after 3 monthes I want to know how many hours a user moved her tasks to next iteration, ...
Is there any tools for this?
No such a tool can exactly achieve that. There is an extension Team Capacity Management, but seems it's not apply for you.
If you want to know how many hours a user moved her tasks to next iteration, then you need to get the planned hours then subtract the completed hours in current iteration. Alternatively you can add tags on the work items which moved to the next iteration, then create a query which filter by the tags to get the sum of hours.
e.g.:
Create a query 'RemainingWork' with the column Assigned
to and Remaining Work added in "next iteration" (e.g.: iteration
2 here) to filter the moved work items from pervious iteration with the tag.
Save it in Shared queries
Add Chart for Work items widget in your project dashborad, then
configure the widget. Then you can see the hours a user moved tasks
to next iteration in the chart:

Query limited data in firebase

I am working on an application that retrieves the posts from firebase. The problem is I want to retrieve the first 20 posts and show in a table. When a user clicks the next button, it will retrieve the next 20 posts and show and so on.
I know firebase provides the following methods
queryLimitedToFirst
queryLimitedToLast
queryStartingAtValue
queryEndingAtValue
queryEqualToValue
But how do I use them in conjunction to retrieve the desired results like I want?
Here is the structure of the data I have:
You should order query by some property (I usually use timestamp). This organises your orders from latest to oldest. When you have them ordered you should limit them:
queryOrdered(byChild: "timestamp").queryLimited(toLast: UInt(limit))
As you can see we can limit results to whatever number we like. You can use this to read your posts each time for 20 results more.
So the first time you call it with a limit of 20, next time with a limit of 40, etc. Keep in mind that this will return posts that were already returned in the previous call.
Instead you could combine it with queryStartingAtValue and use your last post tiemstamp - this will "skip" your previous results and return only 20 posts you need.
This is just an idea but I think it should work like expected.

Using Yahoo Pipes to filter tweets

I am trying to create a yahoo pipe that takes ideally takes all tweets tweeted at any point in time and filters down by a number of attributes to then display a filtered feed.
Basically in order this is what I want to happen:
Get a feed of all tweets at any one time.
Filter tweets by geolocation origin, i.e. UK,
Filter by a number of of different combinations of keywords.
Output as an RSS feed (though this isn't really the crucial stage as Yahoo Pipes takes care of this anyway)
Disclaimer: of course I understand that there are limits to the amount of tweets that could come through etc but I would like to cast the input net as wide as possible.
I have managed to get stages 3 & 4 working correctly and for the time being I am not really worrying about step 2 (although if you have any suggestions I am all ears), but stages 1 is where I am struggling. What I have attempted is using a Fetch Feed module with the URL - http://search.twitter.com/search.atom?q=lang:en - however it seems that this only pulls 15 tweets. Is there any way that I can pull more than 15 tweets every time the pipe is run, otherwise I think this may all be in vain.
FYI, here is the link to the pipe as it stands - http://pipes.yahoo.com/ludus247/182ef4a83885698428d57865da5cf85b
Thanks in advance!

How to build rails analytics dashboard

I'm looking to build an analytics dashboard for my data in a rails application.
Let's say I have a list of request types "Fizz", "Buzz", "Bang", "Bar".
I want to display a count for each day based on type.
How should I do this?
Here is what I plan on doing:
Add get_bazz_by_day, get_fizz_by_day, etc to the appropriate models.
In each model get all records of type Fizz, then create an array that stores date and count.
format in view so a JS library can format it into a pretty graph.
Does this sound reasonable?
Depending on number of records, your dashboard can soon get performance problems.
Step 1 is misleading. Don't get the data for each day individually, try to get them all at once.
In Step 2 you can have the database do the the aggregation over days, with the group method.
See http://guides.rubyonrails.org/active_record_querying.html#group
Fizz.select("date(created_at) as fizzed_day, count(*) as day_count").
group("date(created_at)")
In Step 3 you need to take care that days without any fizzbuzz are still displayed, as they are not returned in the query.

How to automatically measure\monitor the average of sums of a consecutive samplers in jmeter?

I have the following JMeter test plan.
+Test Plan
+Login Thread Group
HttpRequest1
HttpRequest2
HttpRequest3
Is there a way to automatically view\monitor the average of sums of HttpRequest1 ,2 and 3?
I couln't found a way to do it in "Summary Report" or "Aggregate Report"
Is it possible? or do I have to do it manually?
Do you explicitly mean 'the average of sums' As in the average of the total sum for each request over the duration of the test run? If so, then I'm not aware of any JMeter listeners will show you the sum of elapsed time for a sampler, it's not something typically required. Instead, you could probably get what you need fairly easily from reading the jtl file at the command line.
But perhaps you meant something else, you might find that using a Transaction Controller serves you requirements. This will record and show the total elapsed time for multiple requests. So in your example, you might wrap HTTPRequest1, 2 & 3 in a transaction controller and this would give you the sum of all three requests. Then, the Aggregate and Summary listeners would show you the average for this transaction as a separate line.

Resources