If you drop/modify a table or try to add a column using an existing ENUM, alembic will complain: sqlalchemy.exc.ProgrammingError: (ProgrammingError) […]

According to this post , this script launch a PyGame windows with the image you’ve passed in input_loc and let’s […]

Usage some-not-formated-json-string | python -mjson.tool Exemple Creation of a json.php script which outputs a JSON string: <?php $a = array( […]

Everyone can get source code from github(https://github.com/dome2322/crawlAmazon.git). the project are: 1.get product image and text from Amazon.com 2.built with Python […]

strescaped = urllib.quote(password, safe=’àèéìòù”£’).decode(‘utf-8’).encode(‘latin-1’) formdata = {‘jusername’: username, ‘jpassword’:str_escaped}

lxml (http://lxml.de/) in python is fast efficient and effective. Perfect for those command line scripts that need a simple config […]

import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt sns.set_style(‘whitegrid’) FILE_NAME = ‘../input/example.csv’ […]

For people who spend half of their lives in a terminal user experience and functionality is highly important. Making you […]

I was looking how to use a python-equivalent range function. The closest I found is Array.apply(null, Array(16)).map( function (_, i) […]

Watching Eric Rose’s dubiously titled talk on Nose was extremely interesting. The most immediately useful takeway was nose-progress, which makes […]

This is more or less an idea I had a couple weeks ago, and the more I think about it, […]

If you want to run some program using Python, for example maven build use this import subprocess mavenProcess = subprocess.Popen(‘mvn […]