- Create script
my-script.pyx - Create
setup.pywith
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext_modules = [Extension("hello", ["hello.pyx"])]| # Merging a pandas groupby result back into DataFrame | |
| # Ref: http://stackoverflow.com/a/29642002/162264 | |
| df['maxval'] = df.groupby(by=['idn']).transform('max') | |
| #Print full dataframe | |
| def print_full(x): | |
| pd.set_option('display.max_rows', len(x)) | |
| print(x) | |
| pd.reset_option('display.max_rows') |
| # Subplots | |
| fig, axes = plt.subplots(nrows=1, ncols=3, figsize=(15,5)) | |
| average_change[['primal', 'primal_dsoff', 'dual', 'dual_dsoff']].plot(ax=axes[0]) | |
| axes[0].set_ylim(-0.0, 0.4) | |
| axes[0].axhline(0.0, ls='dashed') | |
| axes[0].xaxis.set_ticks(list(average_change.index)) | |
| axes[0].set_title("Improvement of bounds and gap of best clone") | |
| axes[0].set_xlabel("Number of clones (k)") | |
| axes[0].set_ylabel("Average improvement") |
my-script.pyxsetup.py withfrom distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext_modules = [Extension("hello", ["hello.pyx"])]| \documentclass{article} | |
| \pagenumbering{gobble} | |
| \usepackage[a4paper,hmargin={0mm,3mm},vmargin=5mm]{geometry} | |
| \usepackage{tikz} | |
| \begin{document} | |
| \begin{tikzpicture}[scale=.5] | |
| \foreach \x in {0,...,41} | |
| \foreach \y in {0,...,57} | |
| { | |
| \fill[gray!75] (\x,\y) circle (0.06cm); |
| #!/usr/bin/perl | |
| use strict; | |
| use warnings; | |
| =head1 NAME | |
| rename - renames multiple files | |
| =head1 SYNOPSIS |
Citing Marcus Smith (maintainer of pip):
If you think the global site is out of date, and want the latest in the user site, then use:
pip install --upgrade --user SomePackage
If the global site is up to date, and you really just want the same thing duplicated in --user, then use:
pip install --ignore-installed --user SomePackage
read.write.as is a kind of a blogging service but in which most of the posts are anonymous. This gets people to write very deep stuff. It's hard not to start imagining the person on the other side.
Here are some of my favorite posts:
Hola, este es un test