Let's say we would like to have a Python Project in a fashion like this
:~/projects/myproject$ tree -d .
.
├── notebooks
│ ├── notebook1.ipynb
│ └── notebook2.ipynb
└── src| (qlub)jperez@devartis11:~/qlub$ diff custom.css html/css/custom.css | |
| 466c466 | |
| < .bx-wrapper {margin-bottom:20px;} | |
| --- | |
| > .bx-wrapper {margin-bottom:30px;} | |
| 539,564d538 | |
| < .ico-fotos { | |
| < width:232px; | |
| < height:230px; | |
| < display:inline-block; |
| # in .bashrc | |
| GREEN="\[\033[1;32m\]" | |
| WHITE="\[\033[0;37m\]" | |
| PS1="$GREEN\$(~/.rvm/bin/rvm-prompt| sed -e 's/..*/(&)/g')$WHITE$PS1" |
| # A sample Guardfile | |
| # More info at https://github.com/guard/guard#readme | |
| guard 'rspec', all_after_pass:false, zeus:true, bundler:false do | |
| watch(%r{^spec/.+_spec\.rb$}) | |
| watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | |
| watch('spec/spec_helper.rb') { "spec" } | |
| # Rails example | |
| watch(%r{^app/(.+)\.rb$}) do |m| |
| In [3]: for anal in db.year_analysis.find(): | |
| ...: print anal | |
| ...: | |
| {u'idealism': 0, u'_id': ObjectId('5295579f2b5f941bec6b1f50'), u'revolution': 0, u'war': 0.15, u'philosophy': 0} | |
| {u'idealism': 0, u'revolution': 0, u'philosophy': 0, u'year': 1899, u'_id': ObjectId('529559f42b5f941cdd6601cc'), u'war': 0.15} | |
| {u'idealism': 0, u'revolution': 0, u'philosophy': 0, u'year': 1900, u'_id': ObjectId('529559fa2b5f941cdd6601cd'), u'war': 0.35714285714285715} | |
| {u'idealism': 0, u'revolution': 0, u'philosophy': 0, u'year': 1901, u'_id': ObjectId('52955a132b5f941cdd6601ce'), u'war': 0.13333333333333333} | |
| {u'idealism': 0, u'revolution': 0, u'philosophy': 0, u'year': 1902, u'_id': ObjectId('52955a262b5f941cdd6601cf'), u'war': 0.15789473684210525} | |
| {u'idealism': 0, u'revolution': 0, u'philosophy': 0, u'year': 1903, u'_id': ObjectId('52955a532b5f941cdd6601d0'), u'war': 0.15789473684210525} | |
| {u'idealism': 0, u'revolution': 0, u'philosophy': 0, u'year': 1904, u'_id': ObjectId('52955a672b5f941cdd6601d1'), u'war': 0.153846 |
| = Café |
| class Arbol(object): | |
| def __init__(self, elemento=None, izquierda=None, derecha=None): | |
| self.r = elemento | |
| if elemento is not None: | |
| if izquierda: | |
| self._izquierda = izquierda | |
| else: | |
| self._izquierda = Arbol() | |
| if derecha: | |
| self._derecha = derecha |
| In [1]: import lexer | |
| In [3]: lexer = lexer.DibuLexer("[][]1,2,3]") | |
| ERROR: lexer.py:36: Regular expression for rule 't_ID' matches empty string | |
| File "<string>", line unknown | |
| SyntaxError: Can't build lexer |
| import random | |
| def random_balls_in_bins(balls, bins): | |
| """ | |
| Returns a list of <bins> integers that sum <balls> | |
| We can think this as a problem of bosons: | |
| We have to distribute balls in bins. To model this, we use a shuffle of | |
| clc | |
| pkg load signal | |
| fs = 16000 | |
| [audio, fs] = wavread("files/Audio.wav"); | |
| %% | |
| %% | |
| %% |