- Adopted from: https://stubby4j.com/docs/admin_portal.html
- Inspired by Swagger API docs style & structure: https://petstore.swagger.io/#/pet
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 re | |
import sys | |
import json | |
def obtain_ids(user): | |
response = requests.get('https://www.instagram.com/' + user) | |
appid = re.search('appId":"(\d*)', response.text)[1] | |
serverid = re.search('server_revision":(\d*)', response.text)[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
from enum import auto | |
from typing import List, Optional | |
from collections import Counter | |
from fastapi_utils.enums import StrEnum | |
from fastapi_utils.inferring_router import InferringRouter | |
from pydantic import BaseModel | |
from fastapi import HTTPException, Query, Depends | |
router = InferringRouter() |
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
[settings] | |
[email protected] | |
EMAIL_HOST_PASSWORD=your_app_password_here |
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
# First you update your system | |
sudo apt update && sudo apt-get dist-upgrade | |
# Uninstall unnecessary programs | |
sudo apt purge epiphany-browser epiphany-browser-data #browser | |
sudo apt purge pantheon-mail | |
# Bring back Software and Updates from Ubuntu | |
sudo apt-get install software-properties-gtk | |
# Properties Commons (to install elementary tweaks) |
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
axios({ | |
url: 'http://localhost:5000/static/example.pdf', | |
method: 'GET', | |
responseType: 'blob', // important | |
}).then((response) => { | |
const url = window.URL.createObjectURL(new Blob([response.data])); | |
const link = document.createElement('a'); | |
link.href = url; | |
link.setAttribute('download', 'file.pdf'); | |
document.body.appendChild(link); |
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 MultiSerializerViewSetMixin(object): | |
def get_serializer_class(self): | |
""" | |
Look for serializer class in self.serializer_action_classes, which | |
should be a dict mapping action name (key) to serializer class (value), | |
i.e.: | |
class MyViewSet(ViewSet): | |
serializer_class = MyDefaultSerializer | |
serializer_action_classes = { |
NewerOlder