The logging module can make your life easier especially when writing a multi-threaded program. It will help generate a .log file so you can make ex-post controls. You can also use it for debugging.
script.py :
#!/usr/bin/env python
The multiprocessing module was defined in PEP 371 by Jesse Noller and Richard Oudkerk. The idea behind this module is to take advantage of multiple processors on a machine. This module is very similar to the threading module.
Given that you use processes you can avoid the Global Interpreter Lock (GIL).
Let's start by using the Process class.
The Process class is very similar to the threading module’s Thread class.
df['CDM'] = None | |
# La fonction ci-dessous va servir à mapper les CDM | |
def f(x): | |
portfolio_code = x['account_name_2'] | |
asset_class = x['major_asset_type'] | |
if 'BT ' in x['security_name'] : return 0 # pour les billets de treso | |
if 'ECP ' in x['security_name'] : return 0 # pour les billets de treso | |
if 'CD ' in x['security_name'] : return 0 # pour les billets de treso | |
if 'ETF' in x['security_name'] : return 0 # pour les ETF |
npm install express-generator -g | |
express --view=pug passport-local-express | |
J’ai eu un problème d’autorisations sur /usr/local : | |
réglé grace à : sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share} | |
install dependencies: |
[DEFAULT] | |
ServerAliveInterval = 45 | |
Compression = yes | |
CompressionLevel = 9 | |
ForwardX11 = yes | |
[bitbucket.org] | |
User = hg | |
[topsecret.server.com] |
import numpy as np | |
#Input array | |
X=np.array([[1,0,1,0],[1,0,1,1],[0,1,0,1]]) | |
#Output | |
y=np.array([[1],[1],[0]]) | |
#Sigmoid Function | |
def sigmoid (x): |