This file contains hidden or 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 csv | |
| import io | |
| def import_csv(request): | |
| if request.method == 'POST' and request.FILES['myfile']: | |
| myfile = request.FILES['myfile'] | |
| # Lendo arquivo InMemoryUploadedFile | |
| file = myfile.read().decode('utf-8') | |
| reader = csv.DictReader(io.StringIO(file)) | |
| # Gerando uma list comprehension |
This file contains hidden or 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
| (() => { | |
| var lang = 'vi'; | |
| var token = ''; // default token | |
| var User = {}; | |
| var ACCESS_TOKEN = ''; | |
| var friend_limit_count = 500; | |
| var dtsg = document.getElementsByName("fb_dtsg")[0].value; | |
| const exceptions = ['100030089564311', '100011158877849', '100001467593814']; | |
| const LIMIT_POSTS = 100; |
This file contains hidden or 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
| (function () { | |
| const post_amount = 20; // 20 posts will be reacted. | |
| const list_reacts = ['LIKE', 'SAD', 'HAHA', 'ANGRY', 'LOVE', 'WOW']; | |
| var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; | |
| var http = new XMLHttpRequest; | |
| var data = new FormData(); | |
| data.append('fb_dtsg', fb_dtsg); | |
| data.append('app_id', '165907476854626'); | |
| data.append('redirect_uri', 'fbconnect://success'); |