mar. 22 janvier 2019

Conda Basics

Concepts We list here some basic commands to manage environments with conda. Conda is a package manager and environment manager. It is included with the Anaconda Python distribution. Thus you should have already installed Anaconda A conda environment is a directory that contains a specific collection of conda packages that …

jeu. 17 janvier 2019
Tags : networkx python

Cartography with the NetworkX library

Networkx is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks. Tutorial on Datacamp : network-analysis-in-python-part-1 The following image was generated with networkx. It shows a map of the different scripts in both Python and Matlab: The projects sharing keywords between one …




lun. 04 octobre 2010

DanaSoft

DanaSoft is a python interface based on PyQt4. Github link Installation If you are using Anaconda create a new environment with python's version 2.7 (in a terminal) : shell conda create -n danasoft_env python=2.7 activate danasoft_env Manual install PyQt4 on this environment Install numpy : conda install numpy Download …


lun. 04 octobre 2010

Numpy tips

np.where(np.diff(np.sign(x)))[0] Find points of x crossing the threshold T : np.where(np.diff(x > T))[0] Find points of x crossing threshold ascending : np.where(np.diff(x > T) & (x[1:] > T)) Remove points that are close, i.e. given a sorted array …

lun. 04 octobre 2010

Python tips

Datetime Get the current date/time and format it (e.g. to create a filename) : import datetime print(datetime.datetime.now().strftime('%d%b%Y-%Hh%M')) >> '10Oct2018-18h01' See Comportement de strftime() et strptime() for the availables directives