#GIT MAGIC
git clone <your_project> <your_submodule>
cd <your_submodule>
git filter-branch --subdirectory-filter 'path/to/your/submodule' --prune-empty -- --all
| db.<collection_name>.find().forEach(function(d){ db.getSiblingDB('<new_database>')['<collection_name>'].insert(d); }); |
| from pip.req import parse_requirements | |
| # parse_requirements() returns generator of pip.req.InstallRequirement objects | |
| install_reqs = parse_requirements("requirements.txt") | |
| # reqs is a list of requirement | |
| # e.g. ['django==1.5.1', 'mezzanine==1.4.6'] | |
| reqs = [str(ir.req) for ir in install_reqs] |
| def check_dict(indic, template): | |
| return all(item in indic.items() for item in template.items()) |
| a = u"codificaci贸n" | |
| print a # u"codificaci贸n" | |
| print type(a) # <type 'unicode'> | |
| b = a.encode("utf-8") | |
| print b # codificaci贸n # But it depends on your terminal settings | |
| print type(b) # <type 'str'> | |
| c = b.decode("utf-8") | |
| print type(c) # <type 'unicode'> | |
| print c # u"codificaci贸n" |
| """ | |
| Usage: python remove_output.py notebook.ipynb [ > without_output.ipynb ] | |
| Modified from remove_output by Minrk | |
| """ | |
| import sys | |
| import io | |
| import os | |
| from IPython.nbformat.current import read, write |
| curl http://alpha.gsi.dit.upm.es:3030/onyx/upload -F 'UNSET FILE [email protected];type=application/rdf+xml' -F 'graph=http://example.com/prueba' |
| if [ $# -lt 1 ] | |
| then | |
| ONTO=onyx | |
| else | |
| ONTO=$1 | |
| fi | |
| if [ $# -lt 2 ] | |
| then | |
| DIR=~/Doctorado/Ontologies/Onyx | |
| else |
| # /etc/modules: kernel modules to load at boot time. | |
| # | |
| # This file contains the names of kernel modules that should be loaded | |
| # at boot time, one per line. Lines beginning with "#" are ignored. | |
| # Parameters can be specified after the module name. | |
| snd-bcm2835 | |
| i2c-bcm2708 | |
| i2c-dev | |
| fbtft_device name=flexfb gpios=dc:22,reset:27 speed=48000000 |