<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Izaan Zubair</title>
    <description>The latest articles on DEV Community by Izaan Zubair (@izaan).</description>
    <link>https://dev.to/izaan</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F686266%2F7eb27dea-714a-44f4-90bc-a864fc82f351.jpg</url>
      <title>DEV Community: Izaan Zubair</title>
      <link>https://dev.to/izaan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/izaan"/>
    <language>en</language>
    <item>
      <title>Dall-E-2 &amp; Imagen; A premonition for Designers and Illustrators</title>
      <dc:creator>Izaan Zubair</dc:creator>
      <pubDate>Tue, 07 Jun 2022 12:27:50 +0000</pubDate>
      <link>https://dev.to/izaan/dall-e-2-imagen-a-premonition-for-designers-and-illustrators-231a</link>
      <guid>https://dev.to/izaan/dall-e-2-imagen-a-premonition-for-designers-and-illustrators-231a</guid>
      <description>&lt;p&gt;There's no doubt that the future will be dominated by technology, principally by the advancements in Artificial Intelligence. The automated applications of AI have long been perceived as a threat by "Luddite", whereas a technophile enjoys such advancements and adapts to the new changes.&lt;/p&gt;

&lt;p&gt;The recent news by OpenAi has stunned the aspiring artists, Illustrators, and the industry in general by announcing a very advanced text-to-image model called &lt;strong&gt;&lt;a href="https://openai.com/dall-e-2/"&gt;Dall-E-2&lt;/a&gt;&lt;/strong&gt;. Google, following up with Dall-E, also announced a similar application, which is called &lt;a href="https://imagen.research.google"&gt;Imagen&lt;/a&gt;. Both of these models are capable of producing realistic and uncanny images just by inputting a single command or sentence.&lt;/p&gt;

&lt;p&gt;As advanced and realistic as the model is, it is still not possible to fine-tune the generated images accordingly to your requirements. The model is still in its early phases and there's a lot of work and research to be done. Given the advantage, designers or illustrators can use this model to generate an image, use it as an inspiration and then prepare the final product. &lt;/p&gt;

&lt;p&gt;It is also vital here to understand and upskill yourself as the time passes because the future is evidently for those who work alongside the technological advancements.&lt;/p&gt;

&lt;p&gt;The attached pictures are some of the sample images generated by Google's Imagen model.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T2CwV0iT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/08uvfk38m15nb69gwfdu.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T2CwV0iT--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/08uvfk38m15nb69gwfdu.jpg" alt="Google's Imagen Samples" width="554" height="554"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4PUg6fTl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/49jkzz9yl2rh3elcgnag.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4PUg6fTl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/49jkzz9yl2rh3elcgnag.jpg" alt="Imagen Sample 2" width="880" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dalle2</category>
      <category>imagen</category>
      <category>design</category>
      <category>ai</category>
    </item>
    <item>
      <title>Generate random bytes of size n in Python 3.9</title>
      <dc:creator>Izaan Zubair</dc:creator>
      <pubDate>Sat, 14 Aug 2021 19:26:33 +0000</pubDate>
      <link>https://dev.to/izaan/generate-random-bytes-of-size-n-in-python-3-9-bm4</link>
      <guid>https://dev.to/izaan/generate-random-bytes-of-size-n-in-python-3-9-bm4</guid>
      <description>&lt;p&gt;Generating random bytes was somewhat complicated in Python before the new version 3.9 finally introduced the &lt;code&gt;randbytes()&lt;/code&gt; function.&lt;/p&gt;

&lt;p&gt;Prior, we could rely on functions such as &lt;code&gt;os.getrandom()&lt;/code&gt;, &lt;code&gt;os.urandom()&lt;/code&gt; or &lt;code&gt;secrets.token_bytes()&lt;/code&gt; but couldn't generate pseudo-random patterns.&lt;/p&gt;

&lt;p&gt;Python version 3.9 introduced the new function, &lt;strong&gt;randbytes(n)&lt;/strong&gt; which returns bytes of size "n". Let's take a look at how the function works!&lt;/p&gt;

&lt;p&gt;In order to use the function, we have to import it from the &lt;strong&gt;random module&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Let's try generating pseudo-random bytes of size 2:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;random&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;randbytes&lt;/span&gt;

&lt;span class="n"&gt;random_bytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;randombytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;random_bytes&lt;/span&gt;

&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="sa"&gt;b&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="se"&gt;\xf2&lt;/span&gt;&lt;span class="s"&gt;9'&lt;/span&gt; &lt;span class="c1"&gt;# Output
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://i.giphy.com/media/gITE7HxePLZOvDbWNQ/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/gITE7HxePLZOvDbWNQ/giphy.gif" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the inexperienced, it may look like that the returned object is of type/class str, but it isn't.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;random_bytes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="o"&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="err"&gt;'&lt;/span&gt;&lt;span class="nc"&gt;bytes&lt;/span&gt;&lt;span class="s"&gt;'&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The randbytes() shouldn't be used as a substitute for generating secret tokens as Python's official documentation advises against it &lt;/p&gt;

</description>
      <category>python</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
