<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Waslley Souza on Medium]]></title>
        <description><![CDATA[Stories by Waslley Souza on Medium]]></description>
        <link>https://medium.com/@waslleysouza?source=rss-b5fa450f438a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*WOfHhKXCtj3o1OSGfLjCTA.jpeg</url>
            <title>Stories by Waslley Souza on Medium</title>
            <link>https://medium.com/@waslleysouza?source=rss-b5fa450f438a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 20:04:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@waslleysouza/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Using CloudBerry to access OCI Object Storage]]></title>
            <link>https://medium.com/oracledevs/using-cloudberry-to-access-oci-object-storage-586a14c6b823?source=rss-b5fa450f438a------2</link>
            <guid isPermaLink="false">https://medium.com/p/586a14c6b823</guid>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[infrastructure]]></category>
            <category><![CDATA[storage]]></category>
            <category><![CDATA[cloudberry]]></category>
            <dc:creator><![CDATA[Waslley Souza]]></dc:creator>
            <pubDate>Mon, 21 Jan 2019 11:54:03 GMT</pubDate>
            <atom:updated>2019-05-24T14:22:44.896Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Oracle Cloud Infrastructure Object Storage</strong> is a solution for storing files in the cloud. The easiest way to access and upload your files is through storage managers like CloudBerry and Cyberduck.</p><p>In this blog post, you will learn how to use CloudBerry to access Oracle Cloud Infrastructure Object Storage.</p><p>First of all, download and install <strong>CloudBerry Explorer for Amazon S3</strong>. I know it’s very strange, but the S3 APIs are considered a standard for storage and many solutions are using this standard, and CloudBerry is one of them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/877/1*2ZWoV_FWmGW42zkcpEYkYA.png" /></figure><p>Go to your Oracle Cloud Account and create a new user.<br>In the OCI console go to <em>“Identity &gt; Users”</em> and click the <em>Create User</em> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*xGaoa_5pO3QVjrjSwgivgw.png" /></figure><p>Name it as <strong>cloudberry.user</strong> and click the <em>Create </em>button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*M9trkm9TK4GKI-aZ-R2lIA.png" /></figure><p>You need to set up the S3 API authentication credentials for your new user.<br>Go to <em>Customer Secret Keys</em> and click the <em>Generate Secret Key </em>button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*O0EB2SgZUS80Gkls5XmJSQ.png" /></figure><p>Name it as <strong>cloudberry </strong>and click the <em>Generate Secret Key</em> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*6Hk9fOAq9N0ogn6lT-mPQA.png" /></figure><p>Copy the key in a safe place because you will use it.<br>Remember that this key will not be shown again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*UezYd3XS_T6zRYAwmnfAtw.png" /></figure><p>Copy this <em>Access Key</em> because you will use it too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*bZqKfJVAFYGJDslo5q7Xtw.png" /></figure><p>Add your new user to <em>Administrators </em>group.<br>Go to <em>Groups </em>and click the <em>Add User to Group</em> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*868jeXE6NLkAtFUzCJHF9w.png" /></figure><p>Select <em>Administrators </em>and click the <em>Add </em>button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*VT8IGI3SJrmUPMPyPFhY1Q.png" /></figure><p>The creation of user is done!<br>Let’s create a new folder. Go to <em>“Object Storage &gt; Object Storage”</em> and click the <em>Create Bucket</em> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/973/1*XDug7UwobIBnYLGGFKUrnw.png" /></figure><p>Name it as <strong>my_bucket</strong> and click the <em>Create Bucket</em> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/964/1*wdTIkyqwbJZtuuFTnb1IQA.png" /></figure><p>Upload some files to the new <em>bucket</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ngtIOiJU6PcdiiW3JAm9KQ.png" /></figure><p>Update the visibility of the new bucket to <strong>Public</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9vPO6druVVfB8W3CzguFag.png" /></figure><p>Open the user menu and click <strong>Tenancy</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hVC5uhWA927cusjpGaec2Q.png" /></figure><p>Copy the <strong>Object Storage Namespace</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E7biJdd93DmP09gHbqS0qA.png" /></figure><p>Go to CloudBerry and create a new account <strong>S3 Compatible</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*kkNLZ86vDrFRuFFxa2omHQ.png" /></figure><p>Enter the:</p><ul><li><strong>Display Name: </strong>OCI Storage</li><li><strong>Service Point: </strong>&lt;object-storage-namespace&gt;.compat.objectstorage.&lt;region&gt;.oraclecloud.com</li><li><strong>Access Key:</strong> The access key generated above</li><li><strong>Secret Key:</strong> The secret key generated above</li><li><strong>Signature Version:</strong> 4</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/351/1*C3Rf0ohGB30wmi2HdM7u-Q.png" /></figure><p>Click the <em>Test Connection</em> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*CZ45wL4SCdI2j0CPE9vvcQ.png" /></figure><p>Now you can see the buckets …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*wdsgd5OpsdypRh712J2Zww.png" /></figure><p>… and the files in your <strong>OCI Object Storage</strong> using CloudBerry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*le_oBdg3CHwckWA6DuQ10A.png" /></figure><p>Have a good time!</p><p><em>Originally published at </em><a href="https://waslleysouza.com.br/en/2019/01/using-cloudberry-to-access-oci-object-storage/"><em>https://waslleysouza.com.br</em></a><em> on January 21, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=586a14c6b823" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/using-cloudberry-to-access-oci-object-storage-586a14c6b823">Using CloudBerry to access OCI Object Storage</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing Anaconda in OCI GPU instance]]></title>
            <link>https://medium.com/oracledevs/installing-anaconda-in-oci-gpu-instance-6a46c6b5ead9?source=rss-b5fa450f438a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a46c6b5ead9</guid>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Waslley Souza]]></dc:creator>
            <pubDate>Mon, 14 Jan 2019 14:54:08 GMT</pubDate>
            <atom:updated>2019-05-11T00:21:45.870Z</atom:updated>
            <content:encoded><![CDATA[<p>Now that you know how to create an Oracle Cloud Infrastructure GPU instance, the next steps are to install Anaconda and use Jupyter Notebook to develop or test your AI projects.</p><p>First of all, go to your Oracle Cloud Account and add the following Ingress Rule in your Security List ( <em>Networking &gt; Virtual Cloud Networks &gt; Virtual Cloud Network Details &gt; Security Lists &gt; Security List Details</em>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*pZnuluerdXMrl-s2.png" /></figure><p>Using a Terminal, access your Ubuntu instance and download the latest version of Ananconda. Today the latest version is <a href="https://www.anaconda.com/download/#linux">Anaconda 2018.12</a>.</p><pre>curl -O <a href="https://repo.continuum.io/archive/Anaconda3-2018.12-Linux-x86_64.sh">https://repo.continuum.io/archive/Anaconda3-2018.12-Linux-x86_64.sh</a></pre><p>When the download is complete, start the installation.</p><pre>bash Anaconda3-2018.12-Linux-x86_64.sh -b</pre><p>Run the following commands to use the conda command.</p><pre>echo -e &#39;\nexport PATH=&quot;$HOME/anaconda3/bin:$PATH&quot;&#39; &gt;&gt; $HOME/.bashrc</pre><pre>source ~/.bashrc</pre><p>Anaconda has been installed! We can continue to configure the environment.</p><p>Create a new environment with Python 3.6, Tensorflow (GPU version) and Keras.</p><pre>conda create -n myenv python=3.6 tensorflow-gpu keras -y</pre><pre>conda install nb_conda -y</pre><p>Update the firewall using iptables to open the port 8888.</p><pre>sudo iptables -I INPUT -p tcp -s 0.0.0.0/0 --dport 8888 -j ACCEPT</pre><pre>sudo service netfilter-persistent save</pre><p>Generate the Jupyter configuration and open it.</p><pre>jupyter notebook --generate-config</pre><pre>vi /$HOME/.jupyter/jupyter_notebook_config.py</pre><p>Add the following code at the beginning of the file.</p><pre>c = get_config()<br>c.NotebookApp.ip = &#39;0.0.0.0&#39;<br>c.NotebookApp.open_browser = False<br>c.NotebookApp.port = 8888</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*Us1sHcJS-kNoTSEV.png" /></figure><p>Run the following command to add a password to access Jupyter environment.</p><pre>jupyter notebook password</pre><p>Start the Jupyter Notebook.</p><pre>jupyter notebook &amp;</pre><p>Done! To access your Jupyter environment, copy and paste the URL into a browser (do not forget to use public IP).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*7gClnXqVBBEtwlBu.png" /></figure><p>Now you have an environment to test your projects!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*OJ-ngfV8FnXewy3I.png" /></figure><p>Have a good time!</p><p><em>Originally published at </em><a href="https://waslleysouza.com.br/en/2019/01/installing-anaconda-in-oci-gpu-instance/"><em>https://waslleysouza.com.br</em></a><em> on January 14, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a46c6b5ead9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/installing-anaconda-in-oci-gpu-instance-6a46c6b5ead9">Installing Anaconda in OCI GPU instance</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CPU vs GPU in Oracle Cloud]]></title>
            <link>https://medium.com/oracledevs/cpu-vs-gpu-in-oracle-cloud-314e2d202b20?source=rss-b5fa450f438a------2</link>
            <guid isPermaLink="false">https://medium.com/p/314e2d202b20</guid>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[gpu]]></category>
            <dc:creator><![CDATA[Waslley Souza]]></dc:creator>
            <pubDate>Wed, 09 Jan 2019 16:26:01 GMT</pubDate>
            <atom:updated>2019-03-11T23:02:09.858Z</atom:updated>
            <content:encoded><![CDATA[<p>If you read my blog post called “<a href="https://waslleysouza.com.br/en/2018/07/optimizing-tensorflow-for-cpu/">Optimizing TensorFlow for CPU</a>“, you learned that you can improve TensorFlow for CPU by just choosing the correct distribution, in this case the Anaconda distribution.</p><p>CPU instances will do the work for simple AI projects, but if you need more computing power to reduce the execution or training time of your project, you need to use GPU instances.</p><p>Since many people have asked me to run the same test using GPU instances, in this post you will see the results of this test!</p><p>For this test, I used Oracle Cloud Infrastructure instead of the Oracle Cloud Infrastructure Classic used in the last blog post. Oracle Cloud Infrastructure is the new generation of Oracle’s IaaS, so it’s the right solution to use now.</p><p>These are the instances:</p><ul><li>CPU Instance (VM.Standard2.2) = 2 OCPUs + 30GB memory</li><li>GPU Instance (VM.GPU3.1) = 1 GPU V100 + 90GB memory</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*csaEPaL93EPIaqOo3bCTtA.png" /><figcaption>Instances</figcaption></figure><p>In the CPU instance I created the Anaconda environment using:</p><pre>conda create -n py36tf tensorflow python=3.6</pre><p>In the GPU instance I created the Anaconda environment using:</p><pre>conda create -n py36tf tensorflow-gpu python=3.6</pre><p>To evaluate performance between CPU and GPU instances, I used TensorFlow to run the following matrix multiplication script:</p><pre>import tensorflow as tf<br>import time<br><br>tf.set_random_seed(42)<br>A = tf.random_normal([10000,10000])<br>B = tf.random_normal([10000,10000])<br><br>def check():<br>    start_time = time.time()<br>    with tf.Session() as sess:<br>        print(sess.run(tf.reduce_sum(tf.matmul(A,B))))<br>    print(&quot;It took {} seconds&quot;.format(time.time() - start_time))<br><br>check()</pre><p>These were the results:</p><p>In CPU instance it took 22.23 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EX-9uRwP8PiKzxJD0lXRsg.png" /><figcaption>CPU instance</figcaption></figure><p>In GPU instance it took 3.41 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XjdkVuOFqm-9B-fq2MaSgw.png" /><figcaption>GPU instance</figcaption></figure><p>The difference between CPU and GPU instances was close to 650%!</p><p>The main goal of this post was to show that you need to think about the requirements of your AI project to choose the right tools and environments to run it with the best performance and budget!</p><p>Have a good time!</p><p><em>Originally published at </em><a href="https://waslleysouza.com.br/en/2019/01/cpu-vs-gpu-in-oracle-cloud/"><em>waslleysouza.com.br</em></a><em> on January 9, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=314e2d202b20" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/cpu-vs-gpu-in-oracle-cloud-314e2d202b20">CPU vs GPU in Oracle Cloud</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with GPU instances in Oracle Cloud]]></title>
            <link>https://medium.com/oracledevs/getting-started-with-gpu-instances-in-oracle-cloud-cb58720a4b88?source=rss-b5fa450f438a------2</link>
            <guid isPermaLink="false">https://medium.com/p/cb58720a4b88</guid>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[iaas]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <dc:creator><![CDATA[Waslley Souza]]></dc:creator>
            <pubDate>Tue, 08 Jan 2019 21:21:32 GMT</pubDate>
            <atom:updated>2019-01-08T21:21:32.027Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are working with artificial intelligence (machine learning or deep learning) projects at some point, you will need to change your CPU instances to GPU instances speed up the training of your models.</p><p>Nowadays, most cloud providers offer GPU as a service and you can use it to speed up your projects. Oracle Cloud offers the two most advanced GPU models for your choice: NVIDIA V100 and NVIDIA P100.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ca1kHuZjNW_RAS5S17PaoA.png" /></figure><p>In this blog post, you’ll learn how to request and create GPU instances in the Oracle Cloud.</p><p>Access your Oracle Cloud account and go to Menu &gt; Administration &gt; Tenancy Details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*QAn2gU4fLz7kir7k5ETKyg.png" /></figure><p>Click Service Limits and expand the “Compute” section. In this section, you can see the limits of your account. By default, the limits for GPU instances are 0 (zero).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xr9boqfRxyx3RcjBFVOBnQ.png" /></figure><p>To increase the limits, you need to go to <a href="https://support.oracle.com/">My Oracle Support</a> and open a service request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q0j6awF3CoDSQxjUBHpKrg.png" /></figure><p>Click Create Service Request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1017/1*WPfvHrPGwYqCqBbhkTjY8A.png" /></figure><p>Select the following from the displayed menus:</p><ul><li><strong>Service Type:</strong> Select Oracle Cloud Infrastructure.</li><li><strong>Service Name:</strong> Select your Oracle Cloud Account.</li><li><strong>Problem Type:</strong> Select <strong>Account Provisioning, Billing and Termination</strong>, and then select <strong>Limit increase</strong>.</li><li><strong>Description:</strong> Enter a good description (For example: I want to use VM.GPU3.1 and VM.GPU3.2 shapes for my Deep Learning projects. I will use these shapes to train neural networks that I created using Keras and TensorFlow. My projects spend 3 hours with CPU instances and I want to accelerate it using GPU instances).</li><li><strong>1) What is your Tenancy OCID?:</strong> Enter your <strong>Tenancy OCID</strong>.</li><li><strong>14) Which Region and Availability Domain are you requesting this for?:</strong> Enter <strong>us-ashburn</strong> or <strong>uk-london</strong>.</li><li><strong>15) What service/resource requires a limit increase?:</strong> Select <strong>Compute</strong>.</li><li><strong>16) What is the total limit being requested for the above service?:</strong> <br>Enter the new total limit (For example: 1 for VM.GPU3.1 and 1 for VM.GPU3.2).</li><li><strong>17) What are you trying to accomplish with this increase?: </strong>Enter the <br>reason for the request (For example: I want to use GPU shapes for my Deep Learning projects).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*wzLA-YpO9gws4uY3J6YEoQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*rglQqlDQZ6bNCMhpiWP2tg.png" /></figure><p>My service request with Severity = 2 was solved in 5 hours.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*_WJhIQfLI1VkDXbgWEgVog.png" /></figure><p>Now you can create your GPU instance!</p><p>Select the following from the displayed menus:</p><ul><li><strong>Operating system or image source:</strong> Canonical Ubuntu 16.04.</li><li><strong>Instance shape:</strong> VM.GPU3.1.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IujIdJMNGKH55I01TRgMFw.png" /></figure><p>Click “Show Advanced Options”, and then click Image tab.<br>Select Gen2-GPU-2018.12.10–0 as your image build.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HkNG3q8mwsEG6K-jte5wJw.png" /></figure><p>Click Create!</p><p>When the status of instance change to RUNNING, get the Public IP Address and access it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WyjNiLHy97rgQl5KpS9f2Q.png" /></figure><p>To validate the instance, run:</p><pre>nvidia-smi</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*y3Dye4BmZUS0HkpIxWnxog.png" /></figure><p>Now you can use Oracle Cloud to accelerate your AI projects.</p><p>Have a good time!</p><p><em>Originally published at </em><a href="http://waslleysouza.com.br/en/2018/12/getting-started-with-gpu-instances-in-oracle-cloud/"><em>waslleysouza.com.br</em></a><em> on December 28, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cb58720a4b88" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/getting-started-with-gpu-instances-in-oracle-cloud-cb58720a4b88">Getting Started with GPU instances in Oracle Cloud</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sending data from Python app to Oracle IoT Cloud Service]]></title>
            <link>https://medium.com/oracledevs/sending-data-from-python-app-to-oracle-iot-cloud-service-d3cc0e5fe66b?source=rss-b5fa450f438a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3cc0e5fe66b</guid>
            <category><![CDATA[paas]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <dc:creator><![CDATA[Waslley Souza]]></dc:creator>
            <pubDate>Tue, 14 Aug 2018 23:44:19 GMT</pubDate>
            <atom:updated>2019-01-08T21:24:12.316Z</atom:updated>
            <content:encoded><![CDATA[<p>If you read my blog post “<a href="http://waslleysouza.com.br/en/2017/06/send-data-from-raspberry-pi-to-oracle-iot-cloud-service/"><em>Send data from Raspberry Pi to Oracle IoT Cloud Service</em></a>“, you learned how to use the CPOSIX SDK to send data from Raspberry Pi to Oracle IoT Cloud Service. Oracle provides SDKs for many programming languages, but if you don’t find a SDK for your favourite programming language (e.g., python), you can use the REST API.</p><p>In this blog post, you will learn how to send humidity and temperature data from Raspberry Pi to Oracle IoT Cloud Service using Python and REST API. You can clone this project from here: <a href="https://github.com/waslleysouza/oraclecloud_iotcs_DHT">https://github.com/waslleysouza/oraclecloud_iotcs_DHT</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*frUD0KR3Ez1CnAgcauJffA.jpeg" /></figure><p>To make the things easier, I created a simple Python Package using REST API for Oracle IoT Cloud Service, and you can learn more here: <a href="https://github.com/waslleysouza/oraclecloud">https://github.com/waslleysouza/oraclecloud</a>.</p><p>First of all, you need to install the required Python Packages.</p><pre>pip install oraclecloud Adafruit_DHT</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-sOvAph0YdsAKtLE0a2Opw.png" /></figure><p>Create the formats.json file.<br> This file has the JSON format of message.</p><pre>[<br>    {<br>        &quot;name&quot;: &quot;Message&quot;,<br>        &quot;urn&quot;: &quot;urn:com:oracle:iot:device:camera:message&quot;,<br>        &quot;type&quot;: &quot;DATA&quot;,<br>        &quot;fields&quot;: [<br>            {<br>                &quot;name&quot;: &quot;license_plate&quot;,<br>                &quot;optional&quot;: &quot;False&quot;,<br>                &quot;type&quot;: &quot;STRING&quot;<br>            },<br>            {<br>                &quot;name&quot;: &quot;confidence&quot;,<br>                &quot;optional&quot;: &quot;False&quot;,<br>                &quot;type&quot;: &quot;NUMBER&quot;<br>            },<br>            {<br>                &quot;name&quot;: &quot;picture_url&quot;,<br>                &quot;optional&quot;: &quot;False&quot;,<br>                &quot;type&quot;: &quot;URI&quot;<br>            }<br>        ]<br>    }<br>]</pre><p>Create the app.py file.<br> This is the main file of the application.</p><pre>#!/usr/bin/python3<br># Waslley Souza (waslleys@gmail.com)<br># 2018<br><br>import Adafruit_DHT<br>import time<br>import json<br>import os<br>import platform<br>from oraclecloud import Iot<br><br><br>USER = &#39;iot&#39;<br>PASS = &#39;welcome1&#39;<br>URL  = &#39;https://192.168.0.177:10443&#39;<br>SHARED_SECRET = &#39;Welcome_1&#39;<br><br>DEVICE_MODEL_URN = &quot;urn:com:oracle:iot:device:temp_hum&quot;<br>DEVICE_MODEL_FORMAT_URN = DEVICE_MODEL_URN + &quot;:message&quot;<br><br><br>sensor = Adafruit_DHT.DHT11<br>#sensor = Adafruit_DHT.DHT22<br><br># GPIO pin<br>pino_sensor = 14<br><br><br>def main():<br>    print(&#39;Running...&#39;)<br>    <br>    while True:<br>        humidity, temperature = Adafruit_DHT.read_retry(sensor, pino_sensor)<br><br>        if humidity is not None and temperature is not None:<br>            print(&quot;Temperature = {0:0.1f} C  Humidity = {1:0.1f} %&quot;.format(temperature, humidity))<br>            data = {&#39;humidity&#39;:humidity,&#39;temperature&#39;:temperature}<br>            iot.send_message(device, DEVICE_MODEL_FORMAT_URN, data)<br>            time.sleep(1)<br>      <br>        else:<br>            print(&quot;Error !!!&quot;)<br><br><br>def _open_file(file_name):<br>    f = open(file_name, &#39;r&#39;)<br>    text = f.read()<br>    f.close()<br>    return text<br><br><br>def _create_file(file_name, text):<br>    f = open(file_name, &#39;w&#39;)<br>    f.write(text)<br>    f.close()<br><br><br>if __name__ == &quot;__main__&quot;:<br>    iot = Iot(USER, PASS, URL, False)<br><br>    if os.path.isfile(&#39;device.txt&#39;):<br>        device_id = _open_file(&#39;device.txt&#39;)<br>        device = iot.get_device(device_id)  <br>        iot.set_shared_secret(SHARED_SECRET)<br><br>    else:<br>        device_model = iot.get_device_model(DEVICE_MODEL_URN)<br>        if not device_model:<br>            formats = json.loads(_open_file(&#39;formats.json&#39;))<br>            device_model = iot.create_device_model(&quot;TemperatureHumidity&quot;, DEVICE_MODEL_URN, formats)<br><br>        device_name = platform.node() + &quot;_DHT&quot;<br>        device = iot.create_device(device_name, SHARED_SECRET, hardware_id=device_name)<br>        iot.activate_device(device, DEVICE_MODEL_URN)<br><br>        _create_file(&#39;device.txt&#39;, device[&#39;id&#39;])<br>    <br>    main()</pre><p>Don’t forget to change this part of code with your environment information.</p><pre>USER = &#39;iot&#39;<br>PASS = &#39;welcome1&#39;<br>URL = &#39;https://192.168.0.177:10443&#39;</pre><p>Execute the following command to start your app.</p><pre>python app.py</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/951/1*2iS2qU24fO9vS6-dEC1c4Q.png" /></figure><p>Now, you can monitor the humidity and temperature using Oracle IoT Cloud Service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EUd-1x7tqny4FPN04vVs2g.png" /></figure><p>Have a good time!</p><p><em>Originally published at </em><a href="http://waslleysouza.com.br/en/2018/08/sending-data-from-python-app-to-oracle-iot-cloud-service/"><em>waslleysouza.com.br</em></a><em> on August 14, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3cc0e5fe66b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/sending-data-from-python-app-to-oracle-iot-cloud-service-d3cc0e5fe66b">Sending data from Python app to Oracle IoT Cloud Service</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing TensorFlow for CPU]]></title>
            <link>https://medium.com/oracledevs/optimizing-tensorflow-for-cpu-d78308cf8fc8?source=rss-b5fa450f438a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d78308cf8fc8</guid>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <dc:creator><![CDATA[Waslley Souza]]></dc:creator>
            <pubDate>Sun, 22 Jul 2018 14:22:02 GMT</pubDate>
            <atom:updated>2019-01-08T21:23:00.060Z</atom:updated>
            <content:encoded><![CDATA[<p>A few days ago I participated in a Brazilian Developers Conference. Among many lectures, one about Intel architecture was very interesting.</p><p>Intel is working to provide more performance for Artificial Intelligence projects with different hardware and software optimizations, as you can see in the following figure. Intel has a TensorFlow distribution with many optimizations for the CPU.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RBjKURh6XmIeyPDG1MeFSg.jpeg" /></figure><p>In this post I will show the results of my test with different TensorFlow and Python distributions with Oracle Cloud.</p><p>For this test I used 2 Compute instances from Oracle Cloud:</p><ul><li>Instance 1 = 1 OCPU + 7,5GB memory</li><li>Instance 2 = 2 OCPUs + 30GB memory</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/934/1*PHk_Dg0FEpRVbgVCp8wLzw.png" /></figure><p>In both compute instances I created 3 different Anaconda environments:</p><pre>conda create -n py36tf tensorflow python=3.6</pre><ul><li>Python + TensorFlow-mkl (TensorFlow with Intel MKL DNN)</li></ul><pre>conda create -n py36tfmkl tensorflow-mkl python=3.6</pre><ul><li>Python (Intel) + TensorFlow-mkl (TensorFlow with Intel MKL DNN)</li></ul><pre>conda create -n py36tfmklintel tensorflow-mkl python=3.6 -c intel</pre><p>To evaluate the TensorFlow performance I used this python script:</p><pre>import tensorflow as tf<br>import time<br><br>tf.set_random_seed(42)<br>A = tf.random_normal([10000,10000])<br>B = tf.random_normal([10000,10000])<br><br>def check():<br>    start_time = time.time()<br>    with tf.Session() as sess:<br>        print(sess.run(tf.reduce_sum(tf.matmul(A,B))))<br>    print(&quot;It took {} seconds&quot;.format(time.time() - start_time))<br><br>check()</pre><p>These were the results:</p><p>In instance 1 it took 70.50 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ETaZEK2Jy84GylHRmFuRsQ.png" /></figure><p>In instance 2 it took 35.95 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VldvwD0l77xleULN1mGyNg.png" /></figure><ul><li>Python + TensorFlow-mkl (TensorFlow with Intel MKL DNN)</li></ul><p>In instance 1 it took 15.69 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R-jhs0QbCGwg0WLGjlZB5w.png" /></figure><p>In instance 2 it took 8.00 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QTKHOTA4YmXMqTFwGPUVUg.png" /></figure><ul><li>Python (Intel) + TensorFlow-mkl (TensorFlow with Intel MKL DNN)</li></ul><p>In instance 1 it took 15.85 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-rAKLSex-7fo9nalAWHPCw.png" /></figure><p>In instance 2 it took 8.13 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1EDJjbRD4yLVI1TpcSMsSw.png" /></figure><p>The difference between the best and the worst cases in both compute instances was 450%!</p><p>Python + TensorFlow-mkl (TensorFlow with Intel MKL DNN) were the best tools, and Python + TensorFlow were the worst tools.</p><p>These results prove that you can use the CPU to train and execute your machine learning and deep learning projects. All you have to do is use the right tool.</p><p>Have a good time!</p><p><em>Originally published at </em><a href="http://waslleysouza.com.br/en/2018/07/optimizing-tensorflow-for-cpu/"><em>waslleysouza.com.br</em></a><em> on July 22, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d78308cf8fc8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/optimizing-tensorflow-for-cpu-d78308cf8fc8">Optimizing TensorFlow for CPU</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Oracle Storage Cloud with Tensorflow]]></title>
            <link>https://medium.com/oracledevs/using-oracle-storage-cloud-with-tensorflow-ca809e0f6612?source=rss-b5fa450f438a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca809e0f6612</guid>
            <category><![CDATA[oracle-cloud-storage]]></category>
            <category><![CDATA[tensorflow]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Waslley Souza]]></dc:creator>
            <pubDate>Wed, 13 Jun 2018 16:08:46 GMT</pubDate>
            <atom:updated>2018-06-13T16:08:46.764Z</atom:updated>
            <content:encoded><![CDATA[<p>Do you know Tensorflow? TensorFlow is an open source software library for high performance numerical computation. Maybe nowadays it is the most famous library used for Machine Learning and Deep Learning projects. This kind of solution is responsible for projects like autonomous vehicles and facial recognition.</p><p>There are many tutorials about Tensorflow and one of my favorites is the <a href="https://www.tensorflow.org/tutorials/image_retraining">Transfer Learning</a>. Transfer Learning is a technique that allows us to reuse an already trained model in a related task. In other words, we can use a model trained to recognize cats and dogs to recognize human faces. Transfer Learning is a good choice for people that have a computer without a GPU (my case =D).</p><p>In an object recognition project, we need to train or retrain our model with a lot of images, and a great storage cloud can be helpful.</p><p>In this blog post, you will learn how to use images stored in Oracle Cloud Object Storage Classic to train your models.</p><p>Please, look at this blog post to learn how to send your images to Oracle Cloud Object Storage Classic: <a href="http://waslleysouza.com.br/en/2018/05/upload-files-to-oracle-object-storage-classic-with-ftm-cli/">Upload files to Oracle Object Storage Classic with FTM CLI</a>.</p><p>TensorFlow has a good tutorial called “TensorFlow for Poets” and I used it to create this project. Download the files from Github.</p><pre>git clone https://github.com/waslleysouza/tf4poets-with-oracle-cloud</pre><p>Inside the tf4poets-with-oracle-cloud folder, start the Jupyter Notebook.</p><pre>jupyter notebook tf4poets-with-oracle-cloud.ipynb</pre><p>The Notebook is very simple.<br> In the third line, I’ve created a code that lists all the images in the local and cloud folders. If you add or remove an image in the cloud folder, this code will update it in your local folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kKuRyYi0yjDXLEBggv_fpg.png" /></figure><p>When you run the fourth line for the first time, all images are downloaded and saved into the tf_files folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*IRWVg6zmpEeZK9r84H0X_Q.png" /></figure><p>The last two lines execute the original scripts.<br> This code retrains the model using the images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/644/1*nBIjaw77urU6SV2WjyX1ew.png" /></figure><p>This code classifies an image. In this case, it tries to identify the type of flower.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XeQjFSjL1W7b-BmdvO1znQ.png" /></figure><p>Have a good time!</p><p><em>Originally published at </em><a href="http://waslleysouza.com.br/en/2018/05/using-oracle-storage-cloud-with-tensorflow/"><em>waslleysouza.com.br</em></a><em> on May 31, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca809e0f6612" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/using-oracle-storage-cloud-with-tensorflow-ca809e0f6612">Using Oracle Storage Cloud with Tensorflow</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upload files to Oracle Object Storage Classic with FTM CLI]]></title>
            <link>https://medium.com/oracledevs/upload-files-to-oracle-object-storage-classic-with-ftm-cli-fffc4b12bd96?source=rss-b5fa450f438a------2</link>
            <guid isPermaLink="false">https://medium.com/p/fffc4b12bd96</guid>
            <category><![CDATA[oracle-object-storage]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[oracle-cloud]]></category>
            <dc:creator><![CDATA[Waslley Souza]]></dc:creator>
            <pubDate>Wed, 13 Jun 2018 16:07:32 GMT</pubDate>
            <atom:updated>2018-06-13T16:07:53.726Z</atom:updated>
            <content:encoded><![CDATA[<p>When you have some files to upload to Oracle Cloud Object Storage Classic, you can do so using the upload buttons on the web interface and it’s very easy!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LOVBvMiJoZVv8RW14hhAyg.png" /></figure><p>But when you need to upload hundreds or thousands of files organized inside folders, you’ll need a tool to make it easier for you. In this blog post you will learn how to use the Oracle Cloud Infrastructure Object Storage Classic File Transfer Manager command-line interface (FTM CLI) to upload this files in the Oracle Cloud.</p><p>First of all, download the FTM CLI here: <a href="http://www.oracle.com/technetwork/topics/cloud/downloads/storage-cloud-upload-cli-3424297.html">http://www.oracle.com/technetwork/topics/cloud/downloads/storage-cloud-upload-cli-3424297.html</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NDFH0FZt2lUlXL2oTEtBZw.png" /></figure><p>Unzip the file and edit the ftmcli.properties file using your environment information.<br> In most cases, you only need to change the username and the REST Endpoint URL.</p><pre>#---------------Account parameters---------------<br><br># Your user name if you&#39;re using FTM CLI 2.4.<br># In case of FTM CLI 2.3 or earlier, user=Storage-acme:jack.jones@example.com<br># OR similar to user=Storage-7b16fede61e1417ab83eb52e06f0e365:jack.jones@example.com<br># for a REST Endpoint (Permanent).<br>user=jack.jones@example.com<br><br># REST Endpoint URL for your account<br># In case of REST Endpoint (Permanent), use similar to the following:<br># https://storage-7b16fede61e1417ab83eb52e06f0e365.storage.oraclecloud.com/v1/Storage-7b16fede61e1417ab83eb52e06f0e365<br>rest-endpoint=https://acme.storage.oraclecloud.com/v1/Storage-acme</pre><p>Copy the folder you want to upload to the Oracle Cloud inside the FTM folder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*cYdweArLJDVmNWUWD8b0Jg.png" /></figure><p>Open a terminal and execute the following command.</p><pre>java -jar ftmcli.jar upload flower_photos flower_photos</pre><p>Enter your password to start the upload.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/901/1*-SZk0HubUTznCSCIJ0uX5Q.png" /></figure><p>Wait for your files to upload to the cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*xDK4dnJzT1TWfY_2I3cWrg.png" /></figure><p>When the upload is complete, all your files will be in the cloud and you can use them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZQunn1DTK087SIPiBoaq6Q.png" /></figure><p>Have a good time!</p><p><em>Originally published at </em><a href="http://waslleysouza.com.br/en/2018/05/upload-files-to-oracle-object-storage-classic-with-ftm-cli/"><em>waslleysouza.com.br</em></a><em> on May 7, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fffc4b12bd96" width="1" height="1" alt=""><hr><p><a href="https://medium.com/oracledevs/upload-files-to-oracle-object-storage-classic-with-ftm-cli-fffc4b12bd96">Upload files to Oracle Object Storage Classic with FTM CLI</a> was originally published in <a href="https://medium.com/oracledevs">Oracle Developers</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>