- Export the plot as SVG
plt.savefig("plot.svg")
- Open
plot.svg
with an editor and include in the definitions the following:
<defs>
<filter id="shadow">
<feOffset dx="0" dy="0"/>
import re | |
def stroke_same_as_fill(file_name, output_file_name): | |
""" | |
Creates a new QML file (QGIS style format) with the colors of the strokes equals to the shape fills. | |
stroke_same_as_fill("/home/marcos/Downloads/teste.qml", "/home/marcos/Downloads/teste2.qml") | |
:param file_name: filename of QML input file | |
:param output_file_name: output | |
""" | |
with open(file_name, 'r') as input_file, open(output_file_name, 'w') as output_file: | |
lines = input_file.readlines() |
git rm --cached -r .idea |
git config --global url."https://[email protected]".insteadOf "https://github.com" | |
git config --global credential.helper 'cache --timeout=28800' | |
git config remote.origin.url https://{USERNAME}:{PASSWORD}@github.com/{USERNAME}/{REPONAME}.git | |
git config -l | |
git config --global user.name "YOUR NAME" | |
git config --global user.email "YOUR EMAIL ADDRESS" |
\usepackage{hyperref} | |
\hypersetup{allcolors=black,colorlinks=true} |
""" | |
this code is here: http://tinyurl.com/hello-network | |
Twitter libraries: | |
https://dev.twitter.com/overview/api/twitter-libraries | |
Twitter Python library: | |
https://github.com/sixohsix/twitter | |
$ sudo pip2.7 install twitter |
print name.encode('ascii', 'ignore') | |
print name.encode('utf-8', 'ignore') |
from osgeo import ogr, osr | |
driver = ogr.GetDriverByName('ESRI Shapefile') | |
dataset = driver.Open(r'tabblock2010_25_pophu.shp') | |
# from Layer | |
layer = dataset.GetLayer() | |
spatialRef = layer.GetSpatialRef() | |
print spatialRef | |
# from Geometry | |
feature = layer.GetNextFeature() | |
geom = feature.GetGeometryRef() |
@BOOK{quetelet1833recherches, | |
address = {Brussels, Belgium}, | |
author = {Quetelet, A}, | |
pages = {87}, | |
publisher = {M. Hayez}, | |
title = {{Recherches sur le penchant au crime aux diff{\'{e}}rens {\^{a}}ges}}, | |
url = {https://books.google.com/books?id=ZNEiAAAAMAAJ}, | |
year = {1833} | |
} |
%http://www.ctan.org/tex-archive/info/symbols/comprehensive/symbols-a4.pdf | |
\usepackage{latexsym} % needs this to have on latex2e | |
$\bullet$ |