Giter Club home page Giter Club logo

py_misinfo_exposure's Introduction

Hi there! ๐Ÿ‘‹ I'm Matt DeVerna.

About me

At the moment (summer of '24), I am an Informatics PhD candidate in the complex networks and systems track at Indiana University. Check out my website www.matthewdeverna.com for the latest information about what I am doing in the world, as I do not update this very often.

Links

The coolest thing about me

I spent 2016 backpacking and visited over 20 countries. I began by spending a handful of months in South East Asia (Thailand โžก๏ธ Laos โžก๏ธ Cambodia). After working for a couple of months as a bartender on Koh Rong Island (Cambodia), I volunteered on a horse farm in Ripoll, Spain (Catalonia) for about a month. There, I helped with the general upkeep of the farm and property: pouring cement to build a horse stable, restoring a swimming pool, and so on. After that, I traveled through Spain for another couple of months. I surfed the couches of friends I made along the way in Barcelona and, later, randomly ran into a friend I had made months earlier in Chang Mai, Thailand in the lobby of a Madrid hostel. Given the serendipitous nature of the encounter, we decided to travel together. We worked north from Madrid through various Spanish towns to Pamplona where, while running with the bulls in the (in)famous festival, I lost my shoes and almost got gored. ๐Ÿƒโ€โ™‚๏ธ Next, I met an old friend from America in England. We bought a crappy car (bright red VW Polo ๐Ÿš—!) and attempted to drive to Mongolia. Ultimately, our car died in a desert in Kazakhstan, but we did successfully cross the Pamir Highway, starting in Dushanbee, Uzbekistan, and finishing in Osh, Kyrgyzstan.

py_misinfo_exposure's People

Contributors

mr-devs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

gi-ux grukz

py_misinfo_exposure's Issues

Remove unnecessary block

The block of code in get_misinfo_exposure_score starting at line 172 can be removed by building the defaultdict(list) directly within the _get_users_data function itself.

Instead of building results as a list of tuples, we can just build the defaultdict(list) as we get data from Twitter.

Handle keyboard interruptions without losing data

Currently, the package works by processing all users provided and - once it is done - converts everything to a dataframe that is then saved all at once.

It would be good if the function could smoothly handle keyboard interruptions without losing the data it has already gathered. This should be simple by using a try/except KeyboardInterrupt block.

Optimize for very large sets of users

Should we run get_users_misinfo_exposure_scores.py for a very large set of users - it will crash at some point because it requires that all of the gathered data is held in memory at once.

A solution to this problem would be to redesign things so that they save individual files for each queried user that contain all of their friends and their user IDs. That way we would never have to hold more than one users total number of friends at once and we could (after all friends have been gathered) iterate through the list of files, load them individually, calculate their score, store it, rinse, and repeat.

Create a command-line script

Create a command-line script that that takes in a file of user IDs and outputs a file with the results.

Potential arguments:

  • -u/--user-file : the input file of user IDs
  • -v/--verbose : boolean to indicate whether or not to print updates
    • --updates : only works with -v and indicates when to provide updates
  • -o/--output-file: name of the output file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.