Updates from May, 2017 Toggle Comment Threads | Keyboard Shortcuts

  • CG 8:15 pm on May 28, 2017 Permalink | Reply
    Tags: image recognition, ,   

    Image Recognition with TensorFlow – python 

    Bildschirmfoto 2017-05-28 um 7.53.32 PM Bildschirmfoto 2017-05-28 um 7.53.56 PM

    1. Start with this link https://www.tensorflow.org/tutorials/image_recognition#usage_with_python_api
    2. Download TensorFlow models repo from Github here https://github.com/tensorflow/models/blob/master/inception/inception/image_processing.py
    3. If you got errors with python, go here https://stackoverflow.com/questions/40357548/inception-v3-guide-on-tensorflow-broken-for-c-and-python
      or
      https://github.com/samjabrahams/tensorflow-on-raspberry-pi/issues/47
    4. Remove the argv command
    Advertisements
     
    • Brooks 11:35 am on June 30, 2017 Permalink | Reply

      magnificent issues altogether, you just gained a emblem new reader. What may you recommend about your publish that you made some days ago? Any certain?

    • restaurant frankfurt oder 1:39 pm on June 30, 2017 Permalink | Reply

      Grüße! Sehr hilfreiche Beratung in diesem Beitrag! Es sind die kleinen Veränderungen, die die größten Veränderungen bewirken werden. Danke für das Teilen!

    • anexo monografia 2:52 am on August 31, 2017 Permalink | Reply

      Heya i’m for the primary tikme here. I came across this board and I in finding It really helpful & it helped me out
      a lot. I hope to offer one thing again and aid others like you helped me.

  • CG 9:54 pm on May 26, 2017 Permalink | Reply
    Tags: macos, pip, , Sierra, , virtualenv   

    Installing TensorFlow on MacOS Sierra 

    I can’t remember every steps but I need to leave some notes that I can refer to later 🙂 I just put everything I can remember here 🙂

    The directory:

    cd /usr/local/lib/python2.7/site-packages/tensorflow/bin
    source activate tensorflow

    code example to test

    >> import tensorflow as tf
    >>> hello = tf.constant(‘Hello, TensorFlow!’)
    >>> sess = tf.Session()
    >>> print sess.run(hello)
    Hello, TensorFlow!
    >>> a = tf.constant(10)
    >>> b = tf.constant(32)
    >>> print sess.run(a+b)
    42
    >>> quit()
    (tensorflow) CG-MacBook-Pro-2:bin Marisa$ deactivate

    Activating virtualenv

    $ cd /path/to/tensorflow/bin
    $ source activate tensorflow
    $ python
    >>> import tensorflow as tf
    >>> print(tf.__version__)
    1.0.1

    Important links:

    1. https://www.tensorflow.org/install/install_mac#the_url_of_the_tensorflow_python_package
    2. https://thkim.org/tensorflow/tensorflowinstallation/tensorflowinstallationvirtualenv/
    3. https://github.com/tensorflow/tensorflow/issues/647
    4. https://codedump.io/share/6Oq22H5Uhoab/1/virtualenv-tensorflow-instalation-validation-with-importerror-no-module-named-tensorflow
    5. https://stackoverflow.com/questions/43647090/virtualenv-tensorflow-installation-validation-with-importerror-no-module-named
    6. http://python-guide-pt-br.readthedocs.io/en/latest/dev/virtualenvs/
    7. https://hackercodex.com/guide/python-development-environment-on-mac-osx/
    8. http://sourabhbajaj.com/mac-setup/Python/virtualenv.html

    The journey:

    Downloading TensorFlow

    Bildschirmfoto 2017-05-25 um 7.09.57 PM

    Install and update

    Bildschirmfoto 2017-05-25 um 7.18.58 PM

    Removing Anaconda

    Bildschirmfoto 2017-05-25 um 7.25.06 PM

    tensorflow library couldn’t be recognized. Installing gpu version

    Bildschirmfoto 2017-05-25 um 8.01.42 PM

    installing for python 2.7

    Bildschirmfoto 2017-05-25 um 9.57.24 PM

    reinstalling python and fixing the PATH

    Bildschirmfoto 2017-05-25 um 10.25.47 PM

    installing virtualenv

    Bildschirmfoto 2017-05-25 um 11.33.43 PM

    installing tensorflow on virtualenv

    Bildschirmfoto 2017-05-26 um 1.14.44 PM

    tensorflow had been successfully installed on virtualenv

    Bildschirmfoto 2017-05-26 um 1.24.11 PM

    tensorflow library still not recognized

    Bildschirmfoto 2017-05-26 um 1.32.30 PM

    finally figure out how to activate the virtualenv

    Bildschirmfoto 2017-05-26 um 1.50.15 PM

    library recognized but there were errors!

    Bildschirmfoto 2017-05-26 um 1.50.42 PM

    reinstall tensorflow to the activated virtualenv, and it worked!

    Bildschirmfoto 2017-05-26 um 1.54.14 PM

    YES!!! 🙂 Now I’m ready to explore! 😉

    Bildschirmfoto 2017-05-26 um 2.16.10 PM

     
  • CG 1:39 pm on February 26, 2015 Permalink | Reply
    Tags: , queue, rabbitmq   

    Installing RabbitMQ on MacOS 

    1. Download RabbitMQ for Mac here
    2. Download Java AMQP client library here
    3. Start RabbitMQ server by running ./rabbitmq-serverBildschirmfoto 2015-02-26 um 11.10.15 vorm.
    4. Check that the server is running properly with ./rabbitmqctl statusBildschirmfoto 2015-02-26 um 11.10.51 vorm.
    5. Compile and run a HelloWorld testing program from the tutorial here. Compile the Send.java and Recv.java files with javac -cp rabbitmq-client.jar Send.java Recv.java. Run Send.java with java -cp .:commons-io-1.2.jar:commons-cli-1.1.jar:rabbitmq-client.jar Send. This will send the message (in this case the message is “Hello World!”) to the queue. And then run Recv.java with java -cp .:commons-io-1.2.jar:commons-cli-1.1.jar:rabbitmq-client.jar Recv to pop out the message on the queue.Bildschirmfoto 2015-02-26 um 11.08.05 vorm.
    6. The server and the queues can also be checked via browser http://localhost:15672/Bildschirmfoto 2015-02-26 um 11.09.31 vorm. Bildschirmfoto 2015-02-26 um 11.08.41 vorm.

    Now the queue is ready.

     
    • Budi Rahardjo 8:20 am on February 28, 2015 Permalink | Reply

      On Linux (I know, it’s not Mac OS X 🙂 ) there’s “amqp-tools”. Install it with “apt-get install amqp-tools”. You’ll get five (5) command line tools. For example if you want to publish something:

      amqp-publish -e exchange_name -b “your message”

      To get a message from a queue:

      amqp-get -q queue_name
      or
      amqp-consume -q queue_name

      I believe these tools are built with rabbitmq-c library. Having said that, I looked at the newer version of rabbitmq-c library in here:
      http://alanxz.github.io/rabbitmq-c/docs/0.5.0/index.html

      It has a number of different tools. Perhaps they changed (upgraded?) the library? I have not looked deeper into it. Basically, it is a C library that you can use to create command line tools. I looked at one of the code, and hardcoded the userid dan password in it so I can use something like this.

      amqp_sendstring localhost 5672 amq.direct test “hello world”

      I have tested amqp-tools and this rabbitmq-c library agains locally installed rabbitmq server. They work!

    • Budi Rahardjo 8:37 am on February 28, 2015 Permalink | Reply

      And now for some clients. I have tested Perl Net::RabbitMQ. Getting it running is easy.

      Publishing message(s) works perfectly, but I am still having problems getting one (1) message from the queue. For some reasons, I got *all* the messages from the queue. ie. get and consume behave the same. I need to tinker some more with the get.

      I haven’t had time to play with Python and Java clients.

  • CG 11:14 pm on July 27, 2013 Permalink | Reply
    Tags: macbook pro, ,   

    Snow Leopard vs Mountain Lion 

    P6150171

    I owned a White Macbook for more than 5 years, and feeling very happy using Leopard and then upgrading to Snow Leopard. After enduring a phd saga for 5 years, the Macbook’s casing started to crack here and there, and then I decided to give it to cadet#1 so that it can stay at home and hopefully will stop cracking.

    I got myself a new MacBook Pro with Mountain Lion (Mac OS X 10.8.4), 2.5GHz Intel Core i5, 4GB 1600MHz DDR3. At first I was astonished with new things that Mountain Lion offers like more finger gestures, mission control, side notifications etc. But after a few days I started to realize that Mountain Lion is not as snappy and as responsive as Snow Leopard.

    Mountain Lion takes several seconds after hibernation to be ready to accept password while Snow Leopard will accept it right away as I open the lid. After several days without restarting the OS, Mountain Lion will acting so slow while Snow Leopard works fine for weeks without being restarted. And when I open lots of tabs on the browser, or firing up web and database server, Mountain Lion sluggishness will acting up again.

    Lots of people have been complaining about Mountain Lion, and they also say that Snow Leopard is the best Mac OS. So what to do? Downgrading?

    This link gives 12 reasons why Mac runs slow with Mountain Lion, and one thing I definitely would do is upgrading the RAM. There are more tips here. I will write some report after I find more ways on how to deal with the sluggish Mountain Lion.

    *Update: Everybody is suggesting to upgrade to SSD and highest possible RAM. Ok will do it. This is a useful link about how to install and additional SSD drive.

     
    • Wildan 1:14 am on July 28, 2013 Permalink | Reply

      My old MBP Core 2 Duo with SSD still fast on Mavericks DP 🙂
      Upgrade to SSD and 16 GB RAM 😀

    • waskita 5:26 am on July 28, 2013 Permalink | Reply

      This is 2012. Please use SSD and maximum possible RAM.

    • CG 9:39 am on July 28, 2013 Permalink | Reply

      have just updated the post and saved a link about upgrading to SSD. thx all.

    • aya 9:58 pm on August 27, 2013 Permalink | Reply

      Can you help mee with this lease ?? Use Verilog HDL to design a 2-bit comparator using 2×4 decoders and any gates required.

    • aya 1:19 am on August 28, 2013 Permalink | Reply

      Can you help me with this please ?? Use Verilog HDL to design a 2-bit comparator using 2×4 decoders and any gates required.

  • CG 12:27 pm on July 19, 2013 Permalink | Reply
    Tags: CodeIgniter, MAMP,   

    Installing MAMP and CodeIgniter on Mountain Lion 

    Installing MAMP:

    1. Download MAMP at  http://mamp.info/en/. Once the .dmg file is downloaded, double click on it if it did not unzip itself. Than drag the MAMP folder into Applications folder.
    2. From Application folder, double click MAMP program and click “Start Servers”. At this point the web server, database server and application server has been activated on your Mac.Screen Shot 2013-07-18 at 1.47.28 PM
    3. If you click Open Start Page, MAMP will show you the MAMP Page on your local webserver (http://localhost:8888/MAMP)
    4. For more details on installing and MAMP setting up, read more here.

    Installing CodeIgniter:

    1. Download CodeIgniter here.
    2. Unzip CodeIgniter by double-clicking it.
    3. Rename CodeIgniter folder into “ci” (this is the common practice).
    4. Copy the folder to the PHP and mySQL enabled server, which is, in this case is in Applications/MAMP/htdocs
    5. Configure system/application/config/config.php by adding $config[‘base_url’] = “http://localhost/ci/”;
    6. Go to http://localhost/ci/Screen Shot 2013-07-18 at 1.47.09 PM
    7. More about getting started with CodeIgniter here
     
    • aya 9:58 pm on August 27, 2013 Permalink | Reply

      Can you help me with this lease ?? Use Verilog HDL to design a 2-bit comparator using 2×4 decoders and any gates required.

    • aya 1:19 am on August 28, 2013 Permalink | Reply

      Can you help me with this please ?? Use Verilog HDL to design a 2-bit comparator using 2×4 decoders and any gates required.

    • Victor 3:16 am on May 20, 2014 Permalink | Reply

      Above it says to add $config[‘base_url’] = “http://localhost/ci/”; are there suppose to be 2 semicolons?

    • Victor 3:24 am on May 20, 2014 Permalink | Reply

      I received and error after following your instructions and adding:
      $config[‘base_url’] = “http://localhost/ci/&#8221”;

      The error reads..

      Not Found

      The requested URL /CI was not found on this server.

    • akmalfikri 10:25 am on March 28, 2015 Permalink | Reply

      @Victor : Remove &#8221 in your $config[‘base_url’]

  • CG 11:42 am on November 23, 2011 Permalink | Reply
    Tags: adium, keychain access, lost password   

    Retrieving lost passwords in MacOS 

    For some reasons I cannot explain here, I have several accounts for emails and socmeds and chat service. Today I forgot one which refers to another account, which I forgot the password, which refers to a dead email. Recursive craziness of losing passwords.

    I tried several ways like guessing all passwords I could remember, trying to find out how to switch the address of the dead email to a live one, an so on. And then I remembered that I connect to most of the accounts (Gmail, YM, FB, etc) using Adium, so tinkered with it to try to recover the passwords, but for no avail.

    So I googled, and find out that all passwords are stored in Finder > Application > Keychain Access. I just need to click the account list there, and put a check on “show password” and enter the mac password, and yay! 🙂

     
    • ucal 11:04 pm on November 23, 2011 Permalink | Reply

      thanks. i just realized it now.

      • CG 4:48 pm on December 3, 2011 Permalink | Reply

        ok good. thx for visiting 🙂

  • CG 6:50 pm on October 13, 2010 Permalink | Reply
    Tags: , , , linux,   

    Compiling assembly on Linux (Ubuntu on Virtual Box) 

    gcc -S logical.c

    gcc -O1 -S logical.c

    gcc -O2 -S logical.c

    objdump -d logical.o

     
  • CG 6:53 pm on October 12, 2010 Permalink | Reply
    Tags: computer architectures, ,   

    Registers in Snow Leopard 64-bit 

    Snow Leopard has different architecture and different register names.


    [image taken from http://www.sealiesoftware.com/blog/archive/2008/09/22/objc_explain_So_you_crashed_in_objc_msgSend.html%5D

     
  • CG 3:39 pm on October 12, 2010 Permalink | Reply
    Tags: , , , , mac os x,   

    Compiling assembly on Snow Leopard 

    Comparing the compiling result with compiling assembly with Leopard (Mac OS X 10.5)

    code in c

    int logical(int x, int y){
       int t1 = x^y;
       int t2 = t1 >> 17;
       int mask = (1<<13)-7;
       int rval = t2 & mask;
       return rval;
    }
    

    gcc -S logical.c

    gcc -O1 -S logical.c

    gcc -O2 -S logical.c

    dumping object file
    gcc -c logical.c
    otool -tv logical.o

     
  • CG 11:45 am on August 19, 2010 Permalink | Reply
    Tags: , sl,   

    Snow Leopard: running in 32 or 64 bit? 

    Have just upgraded memory to 4GB and just found out that the Intel Core 2 Duo is 64 bit, I want to know whether my system running in 32 or 64 bit.

    By default Snow Leopard run in 32 bit but can be changed to 64 by hitting “6” and “4” while booting. This is the result before:

    After I boot and hold “6” and “4” keys, nothing’s changed. Why?
    Because the EFI is still 32-bit, so my system cannot run 64-bit kernel. Oh well.

    More about this here:

    1. http://macperformanceguide.com/SnowLeopard-64bit.html
    2. http://www.askdavetaylor.com/snow_leopard_running_32_bit_64_bit_32bit_64bit.html
    3. http://superuser.com/questions/9083/can-a-32-bit-os-run-in-a-64-bit-processor
    4. http://news.cnet.com/8301-13579_3-10320314-37.html
    5. http://www.9to5mac.com/snow-leopard-64-bit-32-bit-firmware-efi
    6. http://www.apple.com/macosx/technology/
    7. http://www.ahatfullofsky.comuv.com/English/Programs/SMS/SMS.html
     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel