Skip to content

Instantly share code, notes, and snippets.

View igorbrigadir's full-sized avatar

Igor Brigadir igorbrigadir

View GitHub Profile
@igorbrigadir
igorbrigadir / response-expanded.jsonl
Created March 2, 2021 11:32
Twitter v2 Full API response and expanded tweets
{"conversation_id": "1365618709222600705", "text": "RT @tradehunter305: While checking into my hotel, I seen this light skin dude behind me. We ended up on the same floor, I asked him if he w\u2026", "reply_settings": "everyone", "possibly_sensitive": false, "source": "Twitter for iPhone", "public_metrics": {"retweet_count": 1256, "reply_count": 0, "like_count": 0, "quote_count": 0}, "lang": "en", "referenced_tweets": [{"type": "retweeted", "id": "1353880904188506112", "entities": {"urls": [{"start": 274, "end": 297, "url": "https://t.co/9CovM6hF9P", "expanded_url": "https://twitter.com/tradehunter305/status/1353880904188506112/video/1", "display_url": "pic.twitter.com/9CovM6hF9P"}], "hashtags": [{"start": 228, "end": 243, "tag": "tradehunter305"}, {"start": 244, "end": 256, "tag": "miamifreaks"}], "annotations": [{"start": 134, "end": 141, "probability": 0.5495, "type": "Person", "normalized_text": "Ofocurse"}], "mentions": [{"start": 178, "end": 191, "username": "_BDhandsome1"}, {"start": 257, "end": 273, "
C:\Users\USER>curl -v -H "Authorization: Bearer
AAA...zzz"
"
https://api.twitter.com/2/tweets/search/recent?expansions=author_id%2Cin_reply_to_user_id%2Creferenced_tweets.id%2Creferenced_tweets.id.author_id%2Centities.mentions.username%2Cattachments.poll_ids%2Cattachments.media_keys%2Cgeo.place_id&user.fields=created_at%2Cdescription%2Centities%2Cid%2Clocation%2Cname%2Cpinned_tweet_id%2Cprofile_image_url%2Cprotected%2Cpublic_metrics%2Curl%2Cusername%2Cverified%2Cwithheld&tweet.fields=attachments%2Cauthor_id%2Ccontext_annotations%2Cconversation_id%2Ccreated_at%2Centities%2Cgeo%2Cid%2Cin_reply_to_user_id%2Clang%2Cpublic_metrics%2Ctext%2Cpossibly_sensitive%2Creferenced_tweets%2Creply_settings%2Csource%2Cwithheld&media.fields=duration_ms%2Cheight%2Cmedia_key%2Cpreview_image_url%2Ctype%2Curl%2Cwidth%2Cpublic_metrics&poll.fields=duration_minutes%2Cend_datetime%2Cid%2Coptions%2Cvoting_status&place.fields=contained_within%2Ccountry%2Ccountry_code%2Cfull_name%2Cgeo%2Cid%2Cname%2Cplace_type&max_results=10&query=end
@igorbrigadir
igorbrigadir / MariamBarghouti.json
Created May 11, 2021 21:52
@MariamBarghouti Media Policy violation Twitter API Response
{
"data": [
{
"entities": {
"annotations": [
{
"start": 33,
"end": 39,
"probability": 0.9758,
"type": "Place",
This file has been truncated, but you can view the full file.
{
"primary_text": {
"text": "Follow your favorite Topics",
"entities": []
},
"secondary_text": {
"text": "You’ll see top Tweets about them in your timeline. Don’t see your favorite Topics yet? New Topics are added every week.",
"entities": []
},
"top_category_ids": [
@igorbrigadir
igorbrigadir / mutuals.sh
Last active March 30, 2024 09:35
Twitter Mutuals CSV with twarc
#!/bin/bash
# run this like ./mutuals.sh screen_name
# Get all the accounts you follow
twarc2 followers "$1" "$1_followers.jsonl"
# Get all the accounts that follow you
twarc2 following "$1" "$1_following.jsonl"
# Get mutuals ids
@igorbrigadir
igorbrigadir / news_domain_list.json
Last active May 4, 2025 11:49
Twitter List of News Domains
[
"francemusique.fr",
"sumikai.com",
"yadokari.net",
"epoca.globo.com",
"airedesantafe.com.ar",
"nemgym.com",
"numerama.com",
"analgeria.com",
"bobiannews.com",
@igorbrigadir
igorbrigadir / flattened.jsonl
Created July 29, 2021 16:14
Twitter API original Vs twarc flatten output
{"text": "RT @qeensdale: But it's #Boris the fool who is to blame for the latest troubles in Northern Ireland his bloody #Brexit deal.\nBest if he fal\u2026", "lang": "en", "possibly_sensitive": false, "conversation_id": "1384644560446447617", "source": "Twitter for Android", "created_at": "2021-04-20T23:06:03.000Z", "referenced_tweets": [{"type": "retweeted", "id": "1384551429306781700", "text": "But it's #Boris the fool who is to blame for the latest troubles in Northern Ireland his bloody #Brexit deal.\nBest if he falls on his sword. \n\nBBC News - Brexit: Boris Johnson promises to end GB-NI trade barriers\nhttps://t.co/uTbvahkvcz", "lang": "en", "entities": {"urls": [{"start": 213, "end": 236, "url": "https://t.co/uTbvahkvcz", "expanded_url": "https://www.bbc.co.uk/news/uk-northern-ireland-56777985", "display_url": "bbc.co.uk/news/uk-northe\u2026"}], "hashtags": [{"start": 9, "end": 15, "tag": "Boris"}, {"start": 96, "end": 103, "tag": "Brexit"}], "annotations": [{"start": 68, "end": 83, "probability": 0.
@igorbrigadir
igorbrigadir / earlier_example.txt
Last active August 10, 2021 16:14
Copilot tweet json hallucinations
"id": "1377313827226783745", "created_at": "2021-04-01T15:54:26.000Z", "text": "RT @ArborRidge1: We have a Wednesday Golden Egg Winner!! Even the dogs enjoy hunting for our golden egg!! Who will be the lucky person today!! Hint- the staff is watching it closely from the office! @ArborRidgeAptHomes https://t.co/VpdUTEMCW3", "reply_settings": "everyone", "possibly_sensitive": false, "entities": {"urls": [{"start": 212, "end": 235, "url": "https://t.co/VpdUTEMCW3", "expanded_url": "https://www.instagram.com/p/CNIQwHSjoWT/?igshid=1b0vhmepuh4ps", "display_url": "instagram.com/p/CNIQwHSjoWT/\u2026", "images": [{"url": "https://pbs.twimg.com/news_img/1377313827226783745/5jH4O4jW?format=jpg&name=orig", "width": 1080, "height": 1080}, {"url": "https://pbs.twimg.com/news_img/1377313827226783745/5jH4O4jW?format=jpg&name=150x150", "width": 150, "height": 150}], "status": 200, "title": "Arbor Ridge on West Friendly on Instagram: \u201cWe have a Wednesday Golden Egg Winner!! Even the dogs enjoy hunting for our golden egg!!
@igorbrigadir
igorbrigadir / 0_prompt.txt
Created August 27, 2021 13:29
GPT3 Engine davinci Response length 64 Temperature 0.7 Top P 1 Frequency penalty 0 Presence penalty 0
The Values Encoded in Machine Learning Research
by Abeba Birhane, Pratyusha Kalluri, Dallas Card, William Agnew, Ravit Dotan, Michelle Bao
Abstract:
Machine learning (ML) currently exerts an outsized influence on the world, increasingly affecting communities and institutional practices. It is therefore critical that we question vague conceptions of the field as value-neutral or universally beneficial, and investigate what specific values the field is advancing. In this paper, we present a rigorous examination of the values of the field by quantitatively and qualitatively analyzing 100 highly cited ML papers published at premier ML conferences, ICML and NeurIPS. We annotate key features of papers which reveal their values: how they justify their choice of project, which aspects they uplift, their consideration of potential negative consequences, and their institutional affiliations and funding sources. We find that societal needs are typically very loosely connected to the choice of project, if mentioned a
@igorbrigadir
igorbrigadir / 0_prompt.txt
Created August 27, 2021 14:01
GPT3 Engine davinci Response length 64 Temperature 0.7 Top P 1 Frequency penalty 0 Presence penalty 0
How I failed machine learning in medical imaging - shortcomings and recommendations
By Gaël Varoquaux, Veronika Cheplygina
Abstract:
Medical imaging is an important research field with many opportunities for improving patients' health. However, there are a number of challenges that are slowing down the progress of the field as a whole, such optimizing for publication. In this paper we reviewed several problems related to choosing datasets, methods, evaluation metrics, and publication strategies. With a review of literature and our own analysis, we show that at every step, potential biases can creep in. On a positive note, we also see that initiatives to counteract these problems are already being started. Finally we provide a broad range of recommendations on how to further these address problems in the future. For reproducibility, data and code for our analyses are available on https://github.com/GaelVaroquaux/ml_med_imaging_failures
Introduction: