yannis assael | the blog

  • Home
  • About
  • Categories
    • Android
    • Computing
    • iOS
    • Machine Learning
    • MacOSX
  • GitHub
  • Mobile Apps
  • yannisassael.com


Download CuDNN v6.0 RC

Written by iassael on 20/02/2017. Posted in computing

You can download cudnn v6.0 using the following command:

wget http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/cudnn-8.0-linux-x64-v6.0-rc.tgz

  • Continue Reading
  • 3 Comments

AzureRM PowerShell Mac OS X

Written by iassael on 10/02/2017. Posted in computing, macosx

I recently had to install Powershell on my Mac (sigh) (bigger sigh) and I run into issues by trying to get AzureRM to work. Among others:

Login-AzureRmAccount : The ‘Login-AzureRmAccount’ command was found in the module ‘AzureRM.profile’, but the module could not be loaded. For more information, run ‘Import-Module
AzureRM.profile’.
At /Users/iassael/Drive/Code/projects/azure/BulkAddAAD.ps1:5 char:1
+ Login-AzureRmAccount
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Login-AzureRmAccount:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

Everything can be resolved by installing AzureRM from here:

Install-Package -Name AzureRM.NetCore.Preview -Source https://www.powershellgallery.com/api/v2/ -ProviderName NuGet -ExcludeVersion -Destination $home/powershell/modules
Import-Module $home/powershell/modules/AzureRM.Profile.NetCore.Preview
Import-Module $home/powershell/modules/AzureRM.Resources.NetCore.Preview
Import-Module $home/powershell/modules/AzureRM.NetCore.Preview
Login-AzureRmAccount

PS. Import-Module would have to be rerun every time powershell is restarted.

  • Continue Reading
  • No Comments

Google Drive Automatically Clean Trash

Written by iassael on 31/08/2016. Posted in computing, general

2015-01-31_06-57-03
Solution to avoid scrolling down and deleting files; automatically clean your Google Drive’s trash.

https://github.com/iassael/google-drive-trash-cleaner

  • Continue Reading
  • No Comments

Batch-Normalized LSTM for Torch

Written by iassael on 16/04/2016. Posted in computing, machine learning

Recurrent Batch Normalization

Batch-Normalized LSTMs

Tim Cooijmans, Nicolas Ballas, César Laurent, Çağlar Gülçehre, Aaron Courville

http://arxiv.org/abs/1603.09025

Usage

Clone from: https://github.com/iassael/torch-bnlstm

local rnn = nn.LSTM(input_size, rnn_size, n, dropout, bn)

n = number of layers (1-N)

dropout = probability of dropping a neuron (0-1)

bn = batch normalization (true, false)

Example

https://github.com/iassael/char-rnn

Performance

Validation scores on char-rnn with default options

bnlstm_val_loss

 

  • Continue Reading
  • No Comments

Open Python 2 Pickle in Python 3

Written by iassael on 30/03/2016. Posted in computing

Opening a pickle from Python 2 in Python 3 will probably result either:

TypeError: 'str' does not support the buffer interface

or

UnicodeDecodeError: 'ascii' codec can't decode byte 0xab in position 0: ordinal not in range(128)

to solve that you can just use the following code setting the defualt encoding:

import pickle
import gzip
import numpy as np
with open('var/python2pickle.pkl', 'rb') as f:
    data = pickle.load(f, encoding='latin1')
    print(data)

  • Continue Reading
  • No Comments

OpenMP for Mac OS X El Capitan (Torch7)

Written by iassael on 14/03/2016. Posted in computing, machine learning, macosx

Having followed a plethora of guides to achieve proper OpenMP support on OS X, this is how it can be done:

  1. Install Homebrew
  2. run “brew update” (don’t skip that 🙂 )
  3. run “brew install clang-omp”
  4. add the following lines to ~/.profile
    export PATH=/usr/local/bin:$PATH

    # CLANG-OMP
    export CC=clang-omp
    export CXX=clang-omp++

    # Brew Libs
    export C_INCLUDE_PATH=/usr/local/include:$C_INCLUDE_PATH
    export CPLUS_INCLUDE_PATH=/usr/local/include:$CPLUS_INCLUDE_PATH
    export LIBRARY_PATH=/usr/local/lib:$LIBRARY_PATH
    export DYLD_LIBRARY_PATH=/usr/local/lib:$DYLD_LIBRARY_PATH

  • Continue Reading
  • No Comments

mosh: Nothing received from server on UDP port 60001.

Written by iassael on 29/01/2016. Posted in computing

The most probable fix if you are receiving this error is:

sudo iptables -I INPUT 1 -p udp --dport 60000:61000 -j ACCEPT
  • Continue Reading
  • No Comments

Totally remove TimeMachine Backups.backupdb

Written by iassael on 19/09/2015. Posted in computing, macosx

To avoid command line errors with a simple sudo you have to run the following command:

sudo /System/Library/Extensions/TMSafetyNet.kext/Contents/Helpers/bypass rm -rfv /Volumes/[disk]/Backups.backupdb/

replacing [disk] with your drive’s name.

  • Continue Reading
  • No Comments

Toch7 Intel MKL not found

Written by iassael on 04/06/2015. Posted in computing, machine learning

I am on Mac OS X Yosemite, and although I had installed Intel MKL properly, I was getting a mkl_intel_lp64 not found message when I was trying to install Torch7.

The solution was found by adding the following links to your .profile.

source /opt/intel/composer_xe_2015.3.187/bin/compilervars.sh intel64

and most importantly:

export CMAKE_INCLUDE_PATH=$CMAKE_INCLUDE_PATH:/opt/intel/compilers_and_libraries/mac/include:/opt/intel/mkl/include
export CMAKE_LIBRARY_PATH=$CMAKE_LIBRARY_PATH:/opt/intel/compilers_and_libraries/mac/lib:/opt/intel/mkl/lib

  • Continue Reading
  • No Comments

phpmyadmin says table “in use” (mysql)

Written by iassael on 20/05/2015. Posted in computing, general

This message means that your table needs repair, however, the option for repair through the phpmyadmin interface is not available.

Therefore, you need to open a terminal or ssh and run the following commands:

1) cd /var/lib/mysql/DATABASE (where DATABASE is the one containing the table that needs repair)

2) myisamchk –safe-recover TABLE (where TABLE is the table you are trying to repair)

Your table will be fixed in a few minutes!

  • Continue Reading
  • 1 Comment
  • 1
  • 2
  • 3
  • 4