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 os | |
from datetime import datetime | |
import redis | |
import logging | |
import time | |
from http.client import HTTPConnection, socket | |
""" | |
ciao |
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
#!/usr/bin/env python3.4 | |
# -*- coding: utf-8 -*- | |
""" | |
Request Token long termn | |
""" | |
__author__ = "Michele Berardi" | |
__copyright__ = "Copyright 2018, " | |
__license__ = "GPL" |
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 facebook | |
user_long_token = 'EAAHR3c1UymABABifeBxaSxYBQZBLaEqOFZBAnXlHrF9aYOJZAbs4QBZBcULQTC2uNwPylWf2pZBoZBoZAio0AgBQfG8YRd3hYMUIWnrHf4IoZA5ZAlgYqoVbZA27ucCXzeZCfTeNiwYecM48xXkKgHViJkAqorHeYZByhd7aUQQPP9NqzAZDZD' | |
graph = facebook.GraphAPI(access_token=user_long_token, version="3.1") | |
pages_data = graph.get_object("/me/accounts") | |
print(pages_data) | |
""" |
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
graph = facebook.GraphAPI(access_token=page_token, version="3.1") | |
print(graph.get_object(id=page_id, fields='about, category')) | |
""" | |
OUTPUT PARAGRAFO [5] | |
{'about': 'Michelone', 'category': 'Blogger', 'id': '102927594431953'} | |
""" |
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
#!/usr/bin/env python3.4 | |
# -*- coding: utf-8 -*- | |
""" | |
Request Token long termn | |
""" | |
import requests | |
def get_token(access_token_url): |
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
page_id = '102927594431953' | |
page_token = None | |
for item in pages_data['data']: | |
if item['id'] == page_id': | |
page_token = item['access_token'] | |
print(page_token) | |
""" | |
OUTPUT PARAGRAFO[4]: |
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
app_id = '512225539574368' | |
app_secret = '9dc19451ce6a58d4e22e9634053f443f' | |
user_short_token = 'EAAHR3c1UymABAARMW95G9U3NlzSE8lvWbmnJtGr7GauH3aofCCCiZBcxBfZBNN1ZAxOOWMEzzFgJLZAR2QHYtvIMZChB4ykU5U6ZAgvjdRo3lKffPeLJTPDztQZC29lN3mG4rVFFzuQibSVGhbr9Onhzf6oxfGXNbOSD9Sag5D3XjTgoH2LrfEfkUrj0SeZCXoNr9xaT7ZBrFoAZDZD' |
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
{'data': [{'access_token': 'EAAHR3c1UymABAN6W47KDb08KLUcbNq8zJidVO4MJTx1SAZC{ | |
'data': [ | |
{ | |
'access_token': 'EAAHR3c1UymABAN6W47KDb08KLUcbNq8zJidVO4MJTx1SAZCmAF6VqR92jesPIQt773U5ZCBxvnTE0HQC8t2HS8j1ctnZCvvqLIacKRLM6FhhLHNgf9Sqne61QIJ31Nt5MTI85rbm8xnHfAY7oabcfv6Oh3SWqLYDRLVn9dmwwZDZD', | |
'category': 'Blogger', | |
'category_list': [ | |
{ | |
'id': '361282040719868', | |
'name': 'Blogger' | |
} |
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
michelone@bd01$ ./mysqlsh root:@localhost:3307 -e "util.checkForServerUpgrade();" | |
mysqlsh: [Warning] Using a password on the command line interface can be insecure. | |
The MySQL server at localhost:3307 will now be checked for compatibility issues for upgrade to MySQL 8.0... | |
MySQL version: 5.7.24 - Source distribution | |
1) Usage of db objects with names conflicting with reserved keywords in 8.0 | |
No issues found | |
2) Usage of utf8mb3 charset | |
No issues found |
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
sudo yum -y install epel-release | |
sudo yum -y install gcc gcc-c++ python-pip python-devel atlas atlas-devel gcc-gfortran openssl-devel libffi-devel | |
# use pip or pip3 as you prefer for python or python3 | |
pip install --upgrade virtualenv | |
virtualenv --system-site-packages ~/venvs/tensorflow | |
source ~/venvs/tensorflow/bin/activate | |
pip install --upgrade numpy scipy wheel cryptography #optional | |
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0rc0-cp35-cp35m-linux_x86_64.whl | |
# or below if you want gpu, support, but cuda and cudnn are required, see docs for more install instructions | |
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0rc0-cp35-cp35m-linux_x86_64.whl |
OlderNewer