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
{ | |
"10000NFTUSDT": { | |
"ret_code": 0, | |
"ret_msg": "OK", | |
"ext_code": "", | |
"ext_info": "", | |
"result": [ | |
{ | |
"symbol": "10000NFTUSDT", | |
"period": "60", |
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
reddit_username="" | |
password="" | |
client_id="" | |
client_secret="" | |
user_agent="The best thing ever created by me!" |
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 | |
def get_author_total_comments(**kwargs): | |
r = requests.get("https://api.pushshift.io/reddit/comment/search/", params=kwargs) | |
data = r.json() | |
return data['metadata']['total_results'] | |
if __name__ == "__main__": |
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
from flask import Flask | |
from flask_restful import Api | |
from flask_jwt import JWT | |
from security import authenticate, identity | |
from resources.user import UserRegister | |
from resources.item import Item, ItemList | |
from resources.store import Store, StoreList | |
app = Flask(__name__) |
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
[CREDENTIALS] | |
EMAIL = "my.email@gmail.com" | |
PASSWORD = "MySuperSecretPassword" | |
[SERVER] | |
SMTP = "smtp.gmail.com" | |
PORT = 587 |
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
from flask import Flask, request, render_template, jsonify | |
import sys | |
app = Flask(__name__) | |
@app.route('/renewapikey', methods=['POST', 'GET']) | |
def renew_api_key(): | |
data = (request.form.to_dict()) | |
print(data, sys.stderr) |
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
class MyClass: | |
def __init__(self, value1, value2): | |
self.value1 = value1 | |
self.value2= value2 | |
if __name__ == "__main__": | |
init_class_my_class = MyClass("my_new_value1", "my_new_value2") | |
print(init_class_my_class.__dict__) |