Let's reveal the code!

How to run Jupyter/IPython notebooks

In Terminal, change directory to the folder path where your notebooks are.
Then run the following command:

That will open a new browser tab with the Notebook Dashboard. In that dashboard, there is a links list with the current folder contents including your notebooks. Open any notebook, by simply click its corresponding link.

Check Tensorflow Version

Start interactive Python interpreter, by writing the following command in Terminal:

Then write the following tiny script:

when press Enter after the second line, the version number will be printed out to the terminal.

CoreML and coremltools

Core ML framework as Apple documentation states enable you to integrate trained machine learning models into your app.

Models should be in Core ML model format (models with a .mlmodel file extension). This is a new public format for describing models developed be Apple.


Custom Animated Transition for Transparent Modal View Controller using Constraints

This is a complete example on how to display and dismiss a transparent modal view controller with a custom animated transition – from left to right – using autolayout constraints.

Transparent Modal View Custom Animated Transition

I used transition delegate which uses an animation transitioning controller to perform the display and the dismiss animations.

You can find the example project here:

Extend the navigation bar to status bar

Sometimes you may need to create a navigation bar for a view controller that is not part of navigation controller; like for example when display this view controller modally.

Then you will notice this navigation bar doesn’t extend to status bar.

So in your view controller implementation file, you should implement the following method of the UIBarPositioningDelegate .

Remember to add the following code to your view controller header file, to conform the class to UIBarPositioningDelegate protocol; because UINavigationBarDelegate extends UIBarPositioningDelegate.

Then back in your view controller implementation file, assign the delegate for the navigation bar in the viewDidLoad method assuming your navigation bar object called navBar.

detailTextLabel Disappear Issue

If you use UITableView with the cell style of Subtitle, you may need detailTextLabel to be empty in some cases.

Unfortunately setting the text of the detailTextLabel to empty string or nil seems to remove detailTextLabel from cell hierarchy. So after setting back the text of the detailTextLabel to some string value, the detailTextLabel will not appear in the cell any more.

You should write the following lines in order for the detailTextLabel to appear with the new text and to be in the desired position.

Sending Emails using PHPMailer via SMTP

Send Email

Recently I used PHPMailer to send emails via SMTP. PHPMailer is easy to setup class in just a couple of minutes and its sample files are really good. The following steps show how to use it with SMTP for both Gmail and Amazon (SES) Simple Email Service.