Skip to content

Instantly share code, notes, and snippets.

View fernandojunior's full-sized avatar

Fernando Felix fernandojunior

  • Brazil
View GitHub Profile
@fernandojunior
fernandojunior / note.md
Created January 28, 2016 20:14 — forked from fyears/note.md
how to install scipy numpy matplotlib ipython in virtualenv

if you are using linux, unix, os x:

pip install -U setuptools
pip install -U pip

pip install numpy
pip install scipy
pip install matplotlib
#pip install PySide
@fernandojunior
fernandojunior / gist:77e017a650ec9fab5e63
Last active January 28, 2016 23:19
Python science Tools
The SciPy Stack specification - http://www.scipy.org/stackspec.html#stackspec
NumPy>=1.6
scipy>=0.10
matplotlib>=1.1
ipython>= 0.13
pandas>=0.8
sympy>= 0.7
nose>= 1.1
@fernandojunior
fernandojunior / gist:73e089f4de867fc71870
Last active March 26, 2016 00:14
Workaround to fix broken virtualenv (copyreg, psycopg)
@fernandojunior
fernandojunior / gist:f6e4923126bee311ba23
Created January 15, 2016 12:50
Como melhorar meu código em Python, tornando o mais pythonico, legível e fácil de dar manutenção?
https://ericstk.wordpress.com/2016/01/14/como-melhorar-meu-codigo-em-python-tornando-o-mais-pythonico-legivel-e-facil-de-dar-manutencao/
@fernandojunior
fernandojunior / gist:48a9d116ba24b18c1dbc
Last active January 14, 2016 03:45
pypi & setup.py
http://python-packaging-user-guide.readthedocs.org/en/latest/distributing/
https://github.com/pypa/twine
python setup.py egg_info
python setup.py sdist bdist_wheel
twine upload dist/*
@fernandojunior
fernandojunior / gist:580755a2842dfcda13ed
Created January 5, 2016 01:04
SVN GUI client Ubuntu 14.04
$ sudo add-apt-repository ppa:rabbitvcs/ppa
$ sudo apt-get update
$ sudo apt-get install rabbitvcs-nautilus3
# Optional
$ sudo apt-get install rabbitvcs-gedit
$ sudo apt-get install rabbitvcs-cli
$ sudo chown -R $USER:$USER ~/.config/rabbitvcs
@fernandojunior
fernandojunior / gist:7c849b14816ecd8223e4
Last active January 5, 2016 02:01
Android Studio ignore list
https://www.jetbrains.com/idea/help/configuring-ignored-files.html
https://github.com/github/gitignore/blob/master/Android.gitignore
http://stackoverflow.com/questions/28731814/what-files-should-i-be-ignoring-in-subversion-for-an-android-studio-project
http://stackoverflow.com/questions/27311746/mercurial-hgignore-for-android-studio-projects
http://stackoverflow.com/questions/16940934/what-files-should-i-add-to-svn-ignore-in-an-project-using-android-studio
http://blog.th4t.net/android-studio-gitignore.html
http://stackoverflow.com/questions/23487608/which-files-to-ignore-using-to-commit-to-svn-in-android-studio
*.apk
*.ap_
@fernandojunior
fernandojunior / gist:a468b5d7726e978a3e80
Last active December 30, 2015 10:13
Class name using metaclass in python
class Manager(object):
def __init__(self, cls_):
self.cls_ = cls_
def all(self):
print(self.cls_.__name__)
class ModelMeta(type):
@fernandojunior
fernandojunior / gist:f6ea068a2145a662705b
Last active December 30, 2015 09:42
Class name using descriptor in python
class Manager(object):
def __init__(self):
self._inst = None
self._cls = None
def __get__(self, inst, cls=None):
self._inst = inst
self._cls = cls
return self
@fernandojunior
fernandojunior / gist:b3937a03a21649420e4c
Last active December 30, 2015 09:38
Class name using decorator in python
class Manager(object):
def __init__(self, cls_):
self.cls_ = cls_
def all(self):
print(self.cls_.__name__)
def model(cls):
setattr(cls, 'objects', Manager(cls))