4nkh.ca
News
Services
Achievements
Biography
Contact
S.E.O
Hosting
Mobile
Video Games
Business Plan
Basic
Standard
Premium
Basic
Standard
Premium
Supreme
Management
Mail
Advertising
Billing
Language

    NEWS

  • Open Source libraries

     
     

    Jon Krohn at the New-York R confenrence (libraries for Data Science)


    • igraph (R, python, Mathematica & C++)
    • targets (R, successor of drake [for python snakemake])
    • janitor (R, cleaner)
    • dplyr (R, intuitive data analysis)
     
  •  
  • Pennylane

     

    https://github.com/PennyLaneAI/pennylane

     

    Machine learning on quantum hardware. Connect to quantum hardware using PyTorch, TensorFlow, JAX, Keras, or NumPy. Build rich and flexible hybrid quantum-classical models.

    Good to try on AWS Bracket

     
  •  
  • LSTM & Attention Mechanism

     
     

    The attention mechanism, initially used in natural language processing fields, has found its way into finance and other domains. It operates on a simple concept: some parts of the input sequence are more important then others. The attention mechanism improve models and understand's capabilities, by allowing the model to focus on specific parts of the input sequence while ignoring others.

    Incorporating attention into LSTM networks give a context to the model for predictions, certain historical data points may be more relevant than others. The attention mechanism give the LSTM ability to weigh these points more heavily, leading to more accurate and nuanced predictions.

    Prepare de Data ...

    
    from keras.models import Sequential
    from keras.layers import LSTM, Dense, Dropout, AdditiveAttention, Permute, Reshape, Multiply
    
    model = Sequential()
    
    model.add(LSTM(units=50, return_sequences=True, input_shape=(X_train.shape[1], 1)))
    model.add(LSTM(units=50, return_sequences=True, name="lstm_layer"))
    from keras.models import Sequential
    from keras.layers import LSTM, Dense, Dropout, AdditiveAttention, Permute, Reshape, Multiply
    
    model = Sequential()
    
    # Adding LSTM layers with return_sequences=True
    model.add(LSTM(units=50, return_sequences=True, input_shape=(X_train.shape[1], 1)))
    model.add(LSTM(units=50, return_sequences=True, name="lstm_layer"))
    
    attention = AdditiveAttention()
    
    attention_result = attention([model.outputs[0], model.outputs[0]])
    attention_result = Multiply()([model.outputs[0], attention_result])
    
    model.add(tf.keras.layers.Flatten())
    model.add(Dense(1))
    attention = AdditiveAttention()
    
    attention_result = attention([model.outputs[0], model.outputs[0]])
    multiply_layer = Multiply()([model.outputs[0], attention_result])
    
    model.add(tf.keras.layers.Flatten())
    model.add(Dense(1))

    Add the Dropout and BatchNormalization before Compiling ...

    Train, Predict and Visualize

     
  •  
  • DAPHNE service

     
     

    Create the service file:

    
    sudo vim /etc/systemd/system/daphne.service
    sudo vim /etc/systemd/system/daphne.service
    
    
    [Unit]
    Description=daphne daemon
    Requires=daphne.socket
    After=network.target
    [Service]
    Type=simple
    User=user_name
    WorkingDirectory=/var/www/app_name
    ExecStart=/home/user_name/python_env/bin/daphne -u /tmp/daphne.sock app_name.asgi:application
    [Install]
    WantedBy=multi-user.target
    [Unit]
    Description=daphne daemon
    Requires=daphne.socket
    After=network.target
    [Service]
    Type=simple
    User=user_name
    WorkingDirectory=/var/www/app_name
    ExecStart=/home/user_name/python_env/bin/daphne -u /tmp/daphne.sock app_name.asgi:application
    [Install]
    WantedBy=multi-user.target
    

    Command lines:

    
    sudo systemctl start daphne.service
    sudo systemctl stop daphne.service
    sudo systemctl restart daphne.service
    sudo systemctl status daphne.service
    sudo systemctl start daphne.service
    sudo systemctl stop daphne.service
    sudo systemctl restart daphne.service
    sudo systemctl status daphne.service
    
     
  •  
  • Change ssh port

     
     

    Change the specified port:

    vim /etc/ssh/sshd_config
    vim /etc/ssh/sshd_config
    
    

    Restart the deamon:

    systemctl restart ssh
    service ssh restart
    systemctl restart ssh
    service ssh restart
    
    

    Change the port and verify:

    ss -tlpn| grep ssh
    netstat -tlpn| grep ssh
    ss -tlpn| grep ssh
    netstat -tlpn| grep ssh
    
    

    Ask access to firewall:

    ufw allow 30/tcp
    ufw allow 30/tcp
    
    

    If you're on a VPS with a firewall, give access to the port

     
  •  
Page 1 of 2. next last »
  • Join
  • Login
 
 
copyright © 2012 4nkh development