Skip to content

Instantly share code, notes, and snippets.

View fhanspach's full-sized avatar

Felix Hanspach fhanspach

View GitHub Profile
@fhanspach
fhanspach / auto_add_migrations.xml
Created June 15, 2016 15:14
A custom File Watcher for PyCharm to automatically add migrations in django projects
<?xml version="1.0" encoding="UTF-8"?>
<TaskOptions>
<TaskOptions>
<option name="arguments" value="add $FileDir$/$FileName$" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" value="auto add migrations" />
<option name="exitCodeBehavior" value="ERROR" />
<option name="fileExtension" value="py" />
<option name="immediateSync" value="true" />
<option name="name" value="migrations" />
import unittest
# Will this do what I expect?
def fibonacci(n):
"""Generates the n-th Fibonacci number.
The Fibonacci Numbers are always the sum of the previous numbers:
fib(0) = 0
fib(1) = 1