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
| #! /usr/bin/env python3 | |
| # step 1: create two databases, test and test2 | |
| # step 2: execute this | |
| from sqlalchemy import Column, Integer, Enum | |
| from sqlalchemy.schema import CreateSchema | |
| from flask import Flask | |
| from flask.ext.sqlalchemy import SQLAlchemy |
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
| #! /usr/bin/env python | |
| import urllib.request | |
| import json | |
| import subprocess | |
| import time | |
| import sys | |
| url ="https://www.ovh.com/js/dedicatedAvailability/availability-data" | |
| ks1_key = "142sk1" # KS-1, the cheapest box they have |
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
| #! /usr/bin/env python | |
| import re | |
| def extract_text(func): | |
| thisfile = open(func.__code__.co_filename) | |
| for _ in range(func.__code__.co_firstlineno): | |
| thisfile.readline() | |
| next_line = thisfile.readline() | |
| func_text = [] |