yannis assael | the blog

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


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

Solved Windows 8.1 80072f8f Update or Store error

Written by iassael on 04/07/2014. Posted in computing

After spending a whole night getting the 80072f8f and trying all the amazing Microsoft tutorials and diagnostics finally I found a solution.
First of all, I didn’t have a problem with time (of course) nor SSL certs and such stuff. The problem was clearly the permissions of some dirs, and affected both most of my Metro apps and Windows Update. (this meant less restarts for updates for a month and its not that bad)

The problem can be solved easily by just downloading the amazing Tweaking.com Windows Repair (all in one)
http://www.tweaking.com/content/page/windows_repair_all_in_one.html

Just download the application click on all checkboxes and let it run for 3 hours, reboot and you are ready 🙂

Cheers~

  • Continue Reading
  • No Comments

Enable “Unknown Sources” via adb

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

Getting a Nook SimpleTouch I had to enable the android option Unknown Sources via adb shell… so first connect with usb and make sure adb debugging is on…

  1. adb pull /data/data/com.android.providers.settings/databases/settings.db

  2. sqlite3 /path_to_your_folder/settings.db

  3. update secure set value=”1″ where name=”install_non_market_apps”;

  4. .quit

  5. adb push settings.db /data/data/com.android.providers.settings/databases/

  • Continue Reading
  • 2 Comments

Homebrew: ruby bad interpreter: No such file or directory

Written by iassael on 03/06/2014. Posted in computing, macosx

After installing 10.10 DP1 Yosemite (yeah I couldn’t resist the temptation) homebrew gave me the following error:

/usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory

This error can easily be fixed in the following steps:
1) Open terminal

2) nano /usr/local/Library/brew.rb

3) In the first line change “1.8” to “Current”, so it should look like this:

#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0

Cheers~

  • Continue Reading
  • 16 Comments
  • 1
  • 2
  • 3
  • 4