MIT
Install flask and requests to run this example.
This is the follow up to a post I wrote recently called From Require.js to Webpack - Party 1 (the why) which was published in my personal blog.
In that post I talked about 3 main reasons for moving from require.js to webpack:
Here I'll instead talk about some of the technical challenges that we faced during the migration. Despite the clear benefits in developer experience (DX) the setup was fairly difficult and I'd like to cover some of the challanges we faced to make the transition a bit easier.
# see also https://github.com/wrobstory/pgshift | |
import gzip | |
from io import StringIO, BytesIO | |
from functools import wraps | |
import boto | |
from sqlalchemy import MetaData | |
from pandas import DataFrame | |
from pandas.io.sql import SQLTable, pandasSQL_builder |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
import os | |
import imp | |
def importFromURI(self, uri, absl=False): | |
if not absl: | |
uri = os.path.normpath(os.path.join(os.path.dirname(__file__), uri)) | |
path, fname = os.path.split(uri) | |
mname, ext = os.path.splitext(fname) | |
no_ext = os.path.join(path, mname) |
class Table(Base): | |
id = Column(Integer, primary_key=True) | |
_name = Column('name', String(24)) | |
@property | |
def name(self): | |
return self._name; | |
@name.setter | |
def name(self, value): |
This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)
Sister Document - Restore MySQL from Amazon S3 - read that next
this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc