• Stars
    star
    109
  • Rank 319,077 (Top 7 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 10 years ago
  • Updated almost 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

My IPython startup files.

Startup Files

This is inspired by all the really awesome dotfile repos available. We need an ecosystem like this for Python.

Introduction

IPython has a feature that allows you to run scripts before the console starts. From IPython docs:

This is the IPython startup directory

.py and .ipy files in this directory will be run prior to any code or files specified via the exec_lines or exec_files configurables whenever you load this profile.

Files will be run in lexicographical order, so you can control the execution order of files with a prefix, e.g.::

00-first.py 50-middle.py 99-last.ipy

This repo contains my IPython startup files that I've found to be timesaving for my workflow.

How it works

First, who is this for?

My startup scripts are focused on data analysis and prototyping enviroments, as this is my primary purpose for using Python and IPython. I have lots of examples in the startup folder that can be used as ag starting place for other IPython workflows.

There is a requirements.txt file because some of my imports are external libraries.

Installation

First, clone the repo:

git clone https://github.com/CamDavidsonPilon/StartupFiles.git

Create Symlinks

The contents in startup should be added to ~/.ipython/<your_profile>/startup. One method to do this is to create a symlink between ~/.ipython/<profile>/startup and the startup folder in this repo. The script build_symlink will do just that:

./bin/build_symlink

will replace the default profile's startup with symlinks to the local repo. Alternatively, you can run

./bin/build_symlink --profile <profile>

to use an different profile to symlink too.

Building your own

Included is a script, ./bin/ipython_analysis, to query your IPython sqlite database. Yes, IPython stores all your commands in a sqlite database. This script will return suggestions for you to add to your startup scripts.

ipython


New %Magic Commands Included in this Repo

%pyplot

Get the best pieces of matplotlib, plus some extras.

pyplotgif


%pase, %past, %pate

Are all alias to %paste, my most common IPython command and the one I mess up the most.

paste_gif


%lifelines and %stats

The former for development work on lifelines, the latter for general statistical work. I might add sklearn stuff here.

statsgif

More Repositories

1

Probabilistic-Programming-and-Bayesian-Methods-for-Hackers

aka "Bayesian Methods for Hackers": An introduction to Bayesian methods + probabilistic programming with a computation/understanding-first, mathematics-second point of view. All in pure Python ;)
Jupyter Notebook
26,646
star
2

lifelines

Survival analysis in Python
Python
2,337
star
3

lifetimes

Lifetime value in Python
Python
1,446
star
4

tdigest

t-Digest data structure in Python. Useful for percentiles and quantiles, including distributed enviroments like PySpark
Python
379
star
5

PyProcess

Generate stochastic processes using Python. Unfortunately not maintained any longer =(
Python
113
star
6

Python-Numerics

Numerical machines in Python
Python
95
star
7

lifestyles

Work-In-Progress: conjoint analysis in Python
Python
52
star
8

lifelike

WIP predicted survival functions
Python
37
star
9

Graphical-Lasso-in-Finance

Implementations of the graphical lasso method to estimation of covariance matrices in finance.
Python
37
star
10

Subwayjs

make an interactive subway map in javascript.
JavaScript
33
star
11

decision-weights

Homegrown analysis of Prospect Theory: Math, turkers and python =)
Python
33
star
12

PyconCanada2015

My scrapers, data and analysis for PyCon Canada 2015 Keynote
Python
26
star
13

PyDataNY_2019_tutorial

Repo for PyData 2019 Tutorial - New Trends in Estimation and Inference
Jupyter Notebook
26
star
14

demographica

Analyse US name distributions and create age profiles of your users
Python
18
star
15

autograd-gamma

NotImplementedError: VJP of gammainc wrt argnum 0 not defined
Python
15
star
16

PasswordAnalysis

This is a description of human-created passwords using markov models
Python
14
star
17

dog

a simple casual graph evaluator (for experiments)
Python
13
star
18

McData

Repo for data surrounding fast food nutrition and ingredients
Python
10
star
19

SMS_Terminal

Turn your Android into a SMS-based terminal line using Python!
Python
8
star
20

simpsons-paradox

use Python to detect Simpson's paradox
Python
7
star
21

The-Golden-Retrieber

A classification algorithm that classifies Justin Bieber in Twitter display pictures
7
star
22

lifelines-replications

Using lifelines to replicate published articles
Jupyter Notebook
6
star
23

compilers

HTML
5
star
24

python_packages_survey

Python
5
star
25

Playground

Some small scripts that I use
Python
3
star
26

pipp

recommendations after using pip, for PyCon Canada 2015
Python
3
star
27

spec_utils

Python
2
star
28

mIPython

Analyze your common IPython operations.
Python
2
star
29

tf-examples

my tf examples for now
Python
2
star
30

Twittxor

A web-based Twitter game!
Python
2
star
31

projecteuler-utils

utils for working on project euler (no solutions)
Python
2
star
32

heroes

heroes of the storm analysis
Jupyter Notebook
2
star
33

backwards_harmonic

Jupyter Notebook
1
star
34

yeast_counting

Python
1
star
35

coursera

coursera assignments
R
1
star
36

uoft-notes

Course notes for sessions of 2943 and 3030
1
star
37

permutations

Hacking on cycles and permutations
Jupyter Notebook
1
star
38

python-party

Automatically exported from code.google.com/p/python-party
Python
1
star
39

incubator

Python
1
star
40

ipd

simple example of zero-determinant iterated prisoner's dilemma
Python
1
star
41

set_loop

Python
1
star
42

ontario_demographica

Python
1
star
43

riddler-solutions

solution to fivethirtyeight's riddler problems
Python
1
star
44

eem_analysis

Python
1
star
45

demo-repo

This repo
Python
1
star