How to run Java in “unsafe” mode in Safari 11 ?

Unable to read a notification from SAT Buzon Tributario because you can’t sign it?

I was hitting this issue: received a notification from SAT (Mexico IRS) which as you can imagine may be a big deal, the problem is to read it you need to digitally sign it… and the app was not founding anything on my mac’s file system.

So after a while I realized it may be that Safari was blocking it… and yes it was, you need to run the site in “unsafe mode”

The problem is to do so you need to do an obscure (at least to me) Safari trick I found in this page:


Adding this post as it’s not obvious the relationshipt between SAT (Mexican IRS) and this security setting.

Solution in a nutshell:

  • Safari Preferences, Websites, Plug-ins, Java
  • Hold Alt (or Option), click the drop down menu next to the URL (, and select Run in Safe Mode.
  • Voila

UnsatisfiableError: The following specifications were found to be in conflict: keras pil

>conda install -c anaconda pil
Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
– keras
– pil
Use “conda info <package>” to see the dependencies for each package.


Workaround: conda install pillow

“Pillow is the “friendly PIL fork” by Alex Clark and Contributors. PIL is the Python Imaging Library by Fredrik Lundh and Contributors. ”

How to install Tensorflow in an Anaconda virtual environment – Mac

So I have Anaconda installed and wanted to install TensorFlow as well (I’m using PyCharm):

I tried installing TensorFlow with Conda as per official doc:

  • conda create -n tensorflow pip python=3.6
  • source activate tensorflow
  • pip install –ignore-installed –upgrade

However when creating a new virtual environment in PyCharm you need to make sure TensorFlow is installed as well in there, to do so simple do (after you have created your project {i.e. tf_basics} in PyCharm):

  • source activate tf_basics
  • pip install –ignore-installed –upgrade $URL_THAT_MAKES_SENSE I used:
    • pip install –ignore-installed –upgrade
    • Tip: you may get annoying messages like: “Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA”
    • Installing the proper tf version should fix it, take a look here for more info:
    • Or just do…
      import os
      os.environ[‘TF_CPP_MIN_LOG_LEVEL’] = ‘2’

To test your virtual env is running TensorFlow you can run TensorFlow hello world:

import tensorflow as tf
hello = tf.constant(‘Hello, TensorFlow!’)
sess = tf.Session()



How to add you xcode project to github

So you created a brand new xcode project and selected a local repository and are wondering how to add it to github?

Fear not, below steps to make it happen:


  1. Navigate to the path of your xcode project and run:
    git remote add foodTracker
  2. Pull the changes
    Git will complain of “fatal: refusing to merge unrelated histories”  solution”–allow-unrelated-histories” use the option
    git pull REPOSITORY master –allow-unrelated-histories
  3. Now you should be able to push from xcode

Other useful commands:

  • git show remote
  • git remote remove REPOSITORY

Happy coding!

Checking what your Mac is loading at startup and userlogon

Summary from:

Apps loaded at startup

  1. /Library/StartupItems
  2. /Library/LaunchDaemons
  3. /System/Library/LaunchDaemons

User (ran at user logon):

  1.  ~/Library/LaunchAgents
    • Found this guy:
    • Google updater, decided to keep it, but if you want to read mode try this post
  2. /Library/LaunchAgents/
  3. /System/Library/LaunchAgents/


  1. crontab -l

Kernell extensions

  1. kextstat | grep YOUR_QUERY

Login and LogOut Hooks:

  1. defaults read LoginHook
  2. defaults read LogoutHook

Keras 2 API tips

“Old” Keras Dense declaration in Keras 2 API :

model.add(Dense(11, input_dim=11, init=”uniform”, activation=”relu”))

is now:

Dense(11, input_dim=11, activation=”relu”, kernel_initializer=”uniform”)

If when adding you

  • TypeError: add() got an unexpected keyword argument ‘init’


UserWarning: The `nb_epoch` argument in `fit` has been renamed `epochs`.
warnings.warn(‘The `nb_epoch` argument in `fit` ‘