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
def draw_heatmap(data,inner_row, inner_col, outer_row, outer_col, values, vmin,vmax): | |
sns.set(font_scale=1) | |
fg = sns.FacetGrid( | |
data, | |
row=outer_row, | |
col=outer_col, | |
margin_titles=True | |
) | |
position = left, bottom, width, height = 1.4, .2, .1, .6 |
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
def vertical_mean_line(x, **kwargs): | |
plt.axvline(x.mean(), linestyle ="--", | |
color = kwargs.get("color", "r")) | |
txkw = dict(size=15, color = kwargs.get("color", "r")) | |
label_x_pos_adjustment = 0.08 # this needs customization based on your data | |
label_y_pos_adjustment = 5 # this needs customization based on your data | |
if x.mean() < 6: # this needs customization based on your data | |
tx = "mean: {:.2f}\n(std: {:.2f})".format(x.mean(),x.std()) | |
plt.text(x.mean() + label_x_pos_adjustment, label_y_pos_adjustment, tx, **txkw) |
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
service: fb-TwitterBot | |
provider: | |
name: aws | |
runtime: python3.6 | |
memorySize: 256 | |
timeout: 900 | |
region: ${opt:region, 'eu-central-1'} | |
stage: ${opt:stage, 'production'} | |
environment: |
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
Advanced - Visualize Sales Team: | |
- Advanced - Visualize Sales Team | |
- https://towardsdatascience.com/how-to-explore-and-visualize-a-dataset-with-python-7da5024900ef | |
- - Datascience | |
- BigData | |
- DataVisualization | |
- How to visualize a data set! | |
.... | |
Advanced - Cat, Dog or Elon Musk: | |
- Advanced - Cat, Dog or Elon Musk |
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
from collections import namedtuple | |
from bots.twitter_api import get_twitter_api | |
import random | |
import logging | |
from bots.config import get_post_data | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
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 bots.utils as _utils | |
from dateutil.parser import parse | |
from bots.twitter_api import get_twitter_api | |
import random | |
import logging | |
import time | |
import datetime | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) |
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 tweepy | |
from bots.config import get_config | |
__API = None | |
def configure_twitter_api(): | |
API_KEY = get_config()['API_KEY'] | |
API_KEY_SECRET = get_config()['API_KEY_SECRET'] |
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
# Write Access also | |
API_KEY : "YOUR API KEY HERE" | |
API_KEY_SECRET : "YOUR API SECRET HERE" | |
ACCESS_TOKEN : "YOUR ACCESS TOKEN HERE" | |
ACCESS_TOKEN_SECRET : "YOUR ACCESS TOKEN SECRET HERE" |
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 | |
import yaml as _yaml | |
import logging | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) | |
def get_config(): | |
config_path = os.path.join(os.path.dirname(__file__), '..', 'config', 'production.yml') |
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 tweepy | |
from bots.twitter_api import get_twitter_api | |
import bots.utils as _utils | |
import datetime | |
import logging | |
import random | |
import time | |
logger = logging.getLogger() | |
logger.setLevel(logging.INFO) |