yannis assael | the blog

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


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

Component Analysis using Torch7

Written by iassael on 23/02/2015. Posted in machine learning

  • Screen Shot 2015-02-23 at 05.59.09Principal Component Analysis (PCA)
  • Whitened Principal Component Analysis (W-PCA)
  • Linear Discriminant Analysis (LDA)
  • Locality Preserving Projections (LPP)
  • Neighbourhood Preserving Projections (NPP)
  • Fast Independent Component Analysis (FastICA)

https://github.com/iassael/torch7-decomposition

  • Continue Reading
  • No Comments

Heaviside Step Function between 0 and 1 in Python (if else mathematical expression)

Written by iassael on 23/02/2015. Posted in computing, machine learning

Dirac_distribution_CDF.svgThe numpy.sign() function returns a result between -1 and 1 which was not useful in my case…

To limit the outcomes in the range of 0 and 1 you could still use the numpy.sign() function and write it as follows:

(0.5 * (np.sign(var) + 1))

Cheers

  • Continue Reading
  • No Comments

Fix Photo Booth’s Black Screen in Yosemite

Written by iassael on 03/02/2015. Posted in computing, general, macosx

photobooth_for_win7_by_amir1122-d40s714There are several reasons this problem could be caused. In my case, running Yosemite 10.10, Photo Booth had a black screen and the menu was saying “no camera connected” although FaceTime worked fine.

The common sudo killall VDCAssistant solution didn’t work at all, as well as, reseting my NVRAM.

After a lot of debugging and trial and error, I found out that the problem originated from the fact that I used Dropbox and had created a symbolic link in the place of the ~/Pictures folder.

The solution is to open ~/Library/Preferences/com.apple.PhotoBooth.plist with Xcode and change the link of ~/Pictures/Photo Booth Library to the absolute path of your new pictures folder.

Cheers~

  • Continue Reading
  • No Comments

Find The Word (Τηλεκύβος Cheat)

Written by iassael on 23/01/2015. Posted in computing

unnamed-2Find the greek word from the given letters. Application to cheat and solve games like “Τηλεκύβος” and “Βρες τη λέξη”

https://github.com/iassael/findtheword

  • Continue Reading
  • No Comments

Latex foreach multiple figures loop

Written by iassael on 28/11/2014. Posted in computing, general

800px-LaTeX_logo.svgUsing Latex, many times you want to print multiple figures that have similar names like figure_1.pdf, figure_2.pdf etc…

Instead of hardcoding everything, the foreach package saves lives!

More specifically, you can write something like this:

\begin{figure}[H]
\centering
\foreach \n in {1,3,5,10,20}{
\begin{subfigure}{.18\linewidth}
\centering
\includegraphics[width=\textwidth]{figs/question_9_\n}
\subcaption{\n Trees}
\end{subfigure}
}
\caption{RF various number of trees evaluation.}
\end{figure}

  • Continue Reading
  • 1 Comment

Gmail archive all Read but Unstared

Written by iassael on 18/11/2014. Posted in computing, general

gmailThe last few years I have been using Gmail’s priority inbox.

There have been several times that I want to clean my read messages that are not stared.

Gmail doesn’t provide a direct feature to remove more than 50. So…

You can go to search and type this: is:read -label:starred

Then click on the Select – All tick box under the search bar, and a new option Select All pages will appear

click on that too.

Finally, click on the Archive button. 🙂

  • Continue Reading
  • 1 Comment

Block Spotlight from sharing your searches with Apple

Written by iassael on 16/11/2014. Posted in computing, general, macosx

mac-spotlight-empty

How to restore privacy:

Disable “Spotlight Suggestions” and “Bing Web Searches” in System Preferences > Spotlight > Search Results.

Safari also has a “Spotlight Suggestions” setting that is separate from Spotlight’s “Spotlight Suggestions”. This uses the same mechanism as Spotlight, and if left enabled, Safari will send a copy of all search queries to Apple.

You’d be forgiven for thinking that you’d already disabled “Spotlight Suggestions”, but you’ll also need to uncheck “Include Spotlight Suggestions” in Safari > Preferences > Search.

Advanced users can download the python script: fix-macosx.py to take care of the changes. (first install pyobjc using pip: pip install PyObjC)

Source: https://fix-macosx.com/

  • Continue Reading
  • No Comments

Disable New Facebook Messenger on Android

Written by iassael on 02/11/2014. Posted in android, computing, general

trash-can-in-silver-with-the-lid-at-side_17-510212705Most of the new devices are now forced to install Facebook Messenger.

FB Messenger is the most unfriendly app I have used as you cannot disable it and also I don’t want to be available for everybody all time…

In order to keep the good old messages that you could open whenever you wanted or at least had the choice you can follow the steps:

1) Uninstall official FB Messenger (yeah it feels nice!)

2) Go to Settings -> Security and enable “Unknown sources”

3) We will trick the FB app check by using a dummy app with the same name “com.facebook.orca” but with nothing inside!

4) Download http://blog.ic3man.gr/Facebook.Messenger.Deactivator.apk

( 4.optional You can also compile it yourself from https://github.com/iassael/facebook-messenger-deactivator )

5) Install it! Tada! Now you can be peaceful and notificationless again…

Cheers~

  • Continue Reading
  • No Comments
  • 1
  • 2
  • 3
  • 4
  • 5