I hereby claim:
- I am ipeluffo on github.
- I am ipeluffo (https://keybase.io/ipeluffo) on keybase.
- I have a public key whose fingerprint is 3D90 BDA6 6D96 7456 A602 7AC4 D50C 0771 B051 97C3
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script type='text/javascript' src='https://public.tableau.com/javascripts/api/viz_v1.js'></script><div class='tableauPlaceholder' style='width: 982px; height: 742px;'><noscript><a href='#'><img alt='Dashboard 1 ' src='https://public.tableau.com/static/images/Ma/MapaPoblacinArgentina/Dashboard1/1_rss.png' style='border: none' /></a></noscript><object class='tableauViz' width='982' height='742' style='display:none;'><param name='host_url' value='https%3A%2F%2Fpublic.tableau.com%2F' /> <param name='site_root' value='' /><param name='name' value='MapaPoblacinArgentina/Dashboard1' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /><param name='static_image' value='https://public.tableau.com/static/images/Ma/MapaPoblacinArgentina/Dashboard1/1.png' /> <param name='animate_transition' value='yes' /><param name='display_static_image' va |
int w = 1000; | |
int h = 600; | |
void setup() { | |
size(1000, 600); | |
background(0); | |
stroke(255); | |
float[] linesX = {}; |
@app.command(option("--track", type=str, help="List of words in CSV format to filter stream of tweets", required=True)) | |
async def hashtags_events_generator(self, track: str): | |
""" | |
Generate Kafka events for each hashtag found in tweets matching with the track used to filter the stream. | |
""" | |
logger.info(f"Searching tweets with hashtags: {track}") | |
client = _get_twitter_client() | |
req = client.stream.statuses.filter.post(track=track) |
hashtags_topic = app.topic('hashtags', value_type=str) | |
hashtags_counts_table = app.Table('hashtags_counts', default=int) | |
@app.agent(hashtags_topic) | |
async def hashtags_counter(hashtags) -> None: | |
async for hashtag in hashtags: # type: str | |
hashtags_counts_table[hashtag] += 1 |
@app.page('/{hashtag}/count') | |
@app.table_route(table=hashtags_counts_table, match_info='hashtag') | |
async def hashtag_count(self, request, hashtag): | |
return self.json({ | |
'hashtag': hashtag, | |
'count': hashtags_counts_table[hashtag], | |
}) | |
@app.page('/hashtags') |