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
{ | |
"name": "Udemy Opinion", | |
"description": "Pulls the latest comments for every course on Udemy", | |
"version": "1.0", | |
"manifest_version": 3, | |
"action": { | |
"default_popup": "index.html", | |
"default_title": "Get the latest comments on your courses" | |
}, | |
"icons": { |
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
"""https://www.udemy.com/api-2.0/courses/4202866/reviews/?courseId=4202866 | |
&page=1&is_text_review=1&ordering=course_review_score__rank,-created | |
&fields[course_review]=content,rating | |
&fields[course_review_response]=@min,user""" |
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
version: '3' | |
services: | |
flask-api: | |
build: api | |
command: [ "flask", "run" ] | |
environment: | |
- FLASK_APP=app.py | |
- FLASK_ENV=development | |
- FLASK_DEBUG=1 |
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 React from 'react'; | |
import axios from 'axios'; | |
import { | |
Chart as ChartJS, | |
CategoryScale, | |
LinearScale, | |
PointElement, | |
LineElement, | |
Title, |
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 flask | |
from flask_cors import CORS, cross_origin | |
import os | |
import pandas as pd | |
from peewee import * | |
import json | |
from playhouse.db_url import connect | |
from playhouse.shortcuts import model_to_dict |
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 pandas as pd | |
from datetime import datetime | |
import os | |
import time | |
import requests | |
from db.insert_records import insert_records | |
from tools.telegram import send_telegram_notification |
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 pandas as pd | |
import os | |
import psycopg2 | |
DATABASE_URL = os.environ.get('DATABASE_URL') | |
conn = None | |
def insert_records(records): | |
sql = "INSERT INTO records(address, balance, insert_time) VALUES(%s, %s, %s)" |
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 psycopg2, os | |
DATABASE_URL = os.environ.get('DATABASE_URL') | |
conn = None | |
try: | |
conn = psycopg2.connect(DATABASE_URL) | |
cur = conn.cursor() |
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 requests | |
import os | |
from dotenv import load_dotenv | |
def send_telegram_notification(message): | |
load_dotenv() | |
BOT_API_KEY = os.getenv("BOT_API_KEY") | |
url = 'https://api.telegram.org/bot{BOT_API_KEY}/sendMessage' |
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
def plot_ewm(df, column, span, figsize = (13, 10), ax = None): | |
""" | |
Plots the exponential moving average of a series. | |
""" | |
plt.figure(figsize=figsize) | |
if ax == None: | |
ax = plt.gca() | |
ewm = get_exponential_moving_average_over_period(df, column, span) |
NewerOlder