You must ensure that there is a folder docs in your main folder. This folder docs must have:
- a Makefile
- a conf.py file
- an index.rst file
- 2 folders : _static and _template
| def getTopNewEntities(conn, country, category=None, window=-2, limit=100, count=None): | |
| numday = window | |
| now = pendulum.now(tz='Europe/Paris') | |
| all_en = [] | |
| cur = conn.cursor() | |
| for i in range(0, abs(numday)): | |
| from_date = now.subtract(days=abs(numday + i)).to_datetime_string() | |
| to_date = now.subtract(days=abs(numday + i + 1)).to_datetime_string() | |
| query = getQueryTopEntity(from_date, to_date, country, category) | |
| # cur = conn.cursor() |
| #!/bin/bash | |
| #Ubuntu28.04 | |
| curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb | |
| sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb | |
| sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | |
| sudo apt-get update | |
| sudo apt-get install cuda | |
| conda install pytorch torchvision cudatoolkit=10.1 -c pytorch |
| #!/bin/bash | |
| #Ubuntu28.04 | |
| curl -O http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb | |
| sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb | |
| sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub | |
| sudo apt-get update | |
| sudo apt-get install cuda | |
| conda install pytorch torchvision cudatoolkit=10.1 -c pytorch |
| SPONSORED_HASHTAGS = ["#ad", "#brandambassador", "#collaboration", "#disclosure", "#gift", "#gifted", "#giftedby", | |
| "#giftfrom", "#partner", "#promo", "#promotion", "#sp", "#spon", "#sponsored", "#sponsor", | |
| "#sponsorship", "#sponsoreret", "#sponsoredpost", ""] | |
| SPONSORED_PHRASES = ["brought to you by", "compensated by", "gift from", "gifted by", "in collaboration with", | |
| "collaborated with", "in partnership with", "paid ad", "paid advertisement", "paid by", | |
| "paid for by", "paid partnership with", "paid post", "paid promo", "paid promotion", | |
| "paid sponsorship", "partnered up with", "partnered with", "partnering with", "partnership with", | |
| "sponsored by", "sponsored post", "teamed up with", "teamed with", "teaming up with", | |
| "teaming with", "brand partner", "working with", "promo code", "coupon code", "discount code", |
| def getTopNewEntities(conn, country, category=None, window=-2, limit=100, count=None): | |
| numday = window | |
| now = pendulum.now(tz='Europe/Paris') | |
| all_en = [] | |
| cur = conn.cursor() | |
| for i in range(0, abs(numday)): | |
| from_date = now.subtract(days=abs(numday + i)).to_datetime_string() | |
| to_date = now.subtract(days=abs(numday + i + 1)).to_datetime_string() | |
| query = getQueryTopEntity(from_date, to_date, country, category) |
| # coding: utf-8 | |
| # Author: Axel ARONIO DE ROMBLAY <[email protected]> | |
| # License: BSD 3 clause | |
| import numpy as np | |
| import pandas as pd | |
| import warnings | |
| import os |
| # List unique values in a DataFrame column | |
| # h/t @makmanalp for the updated syntax! | |
| df['Column Name'].unique() | |
| # Convert Series datatype to numeric (will error if column has non-numeric values) | |
| # h/t @makmanalp | |
| pd.to_numeric(df['Column Name']) | |
| # Convert Series datatype to numeric, changing non-numeric values to NaN | |
| # h/t @makmanalp for the updated syntax! |
| # List unique values in a DataFrame column | |
| # h/t @makmanalp for the updated syntax! | |
| df['Column Name'].unique() | |
| # Convert Series datatype to numeric (will error if column has non-numeric values) | |
| # h/t @makmanalp | |
| pd.to_numeric(df['Column Name']) | |
| # Convert Series datatype to numeric, changing non-numeric values to NaN | |
| # h/t @makmanalp for the updated syntax! |