This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongodb = require('mongodb'); | |
const uri = 'mongodb+srv://OMITTED/test'; | |
// May be retained between function executions depending on whether Azure | |
// cleans up memory | |
let client = null; | |
module.exports = function (context, req) { | |
context.log('Running'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// credit goes to | |
//https://thecodebarbarian.com/getting-started-with-azure-functions-and-mongodb | |
const mongodb = require('mongodb'); | |
// URI for MongoDB Atlas | |
const uri = 'mongodb://test.mongodb.net:27017'; | |
module.exports = function (context, req) { | |
context.log('Running'); | |
mongodb.MongoClient.connect(uri, function(error, client) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import twitter | |
import pandas as pd | |
import time | |
def give_followers_list(screen_name): | |
total_followers = [] | |
my_cursor = -1 | |
while my_cursor != 0: | |
my_followers = t.followers.list(screen_name=screen_name,count=200,cursor=my_cursor) |