<?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: nixcodes</title>
    <description>The latest articles on DEV Community by nixcodes (@nixcodes).</description>
    <link>https://dev.to/nixcodes</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%2F757851%2Fb113e9ed-bd12-49e1-89a3-dcb07aebd3e4.png</url>
      <title>DEV Community: nixcodes</title>
      <link>https://dev.to/nixcodes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nixcodes"/>
    <language>en</language>
    <item>
      <title>FastAPI Day 1: Type Hints</title>
      <dc:creator>nixcodes</dc:creator>
      <pubDate>Sat, 21 Jan 2023 04:14:44 +0000</pubDate>
      <link>https://dev.to/nixcodes/fastapi-day-1-type-hints-b03</link>
      <guid>https://dev.to/nixcodes/fastapi-day-1-type-hints-b03</guid>
      <description>&lt;p&gt;Hey there 👋! Today I am starting my day one with FastAPI programming. I have very little knowledge about Python and Django so, I think this is the good time for me to start.&lt;/p&gt;

&lt;p&gt;Today I learnt about Type Hints,&lt;br&gt;
Type Hints are nothing but defining the data types of the variables during the declaration. So that we will have required suggestions (Ctrl+Space) from the IDE like VS Code, Sublime text, etc. &lt;/p&gt;

&lt;p&gt;suggestions when declaring variable without types hints:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F52w34shhl44yokfeps5o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F52w34shhl44yokfeps5o.png" alt="Image description" width="593" height="90"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;suggestions when declaring variable with types hints:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn27qajrxkeiwai27th45.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn27qajrxkeiwai27th45.png" alt="Image description" width="800" height="214"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Type Hints can be used for standard data types like int, str, float, bool, byte. In order to use the generic data types like dict, list, tuple, set we have to import &lt;strong&gt;typing&lt;/strong&gt; module in our code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from typing import List, Set, Tuple, Dict
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>discuss</category>
      <category>productivity</category>
      <category>developer</category>
    </item>
    <item>
      <title>aa</title>
      <dc:creator>nixcodes</dc:creator>
      <pubDate>Sat, 20 Nov 2021 02:57:48 +0000</pubDate>
      <link>https://dev.to/nixcodes/aa-51f9</link>
      <guid>https://dev.to/nixcodes/aa-51f9</guid>
      <description>&lt;p&gt;Puppeteer and the Lighthouse API (you can see the complete code here).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;JavaScript syntax highlighting&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;alert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"Python syntax highlighting"&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;No language indicated, so no syntax highlighting. 
But let's throw in a &amp;lt;b&amp;gt;tag&amp;lt;/b&amp;gt;.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;async function captureReport() {&lt;br&gt;
  // Puppeteer initialization&lt;br&gt;
  const browser = await puppeteer.launch();&lt;br&gt;
  const page = await browser.newPage();&lt;/p&gt;

&lt;p&gt;// Start user flow&lt;br&gt;
  const flow = await lighthouse.startFlow(page, { name: 'My User Flow' });&lt;/p&gt;

&lt;p&gt;// ... Caputure reports here ...&lt;/p&gt;

&lt;p&gt;// End user flow&lt;br&gt;
  return flow.generateReport();&lt;br&gt;
}&lt;br&gt;
Within&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Python - Class</title>
      <dc:creator>nixcodes</dc:creator>
      <pubDate>Sat, 20 Nov 2021 02:56:43 +0000</pubDate>
      <link>https://dev.to/nixcodes/python-class-2092</link>
      <guid>https://dev.to/nixcodes/python-class-2092</guid>
      <description></description>
    </item>
  </channel>
</rss>
