<?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: Softhints</title>
    <description>The latest articles on DEV Community by Softhints (@softhints).</description>
    <link>https://dev.to/softhints</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%2F224329%2F00e6cc1c-3c10-4730-83fc-569d7b294029.png</url>
      <title>DEV Community: Softhints</title>
      <link>https://dev.to/softhints</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/softhints"/>
    <language>en</language>
    <item>
      <title>Convert String to Date in Pandas and Python</title>
      <dc:creator>Softhints</dc:creator>
      <pubDate>Thu, 23 Jun 2022 07:56:25 +0000</pubDate>
      <link>https://dev.to/softhints/convert-string-to-date-in-pandas-and-python-1npp</link>
      <guid>https://dev.to/softhints/convert-string-to-date-in-pandas-and-python-1npp</guid>
      <description>&lt;p&gt;If you need to convert string to dates in Python and Pandas you can check:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://datascientyst.com/convert-string-to-datetime-pandas/"&gt;How to Convert String to DateTime in Pandas &lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It contains basic date conversion like:&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="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_datetime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;'date'&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;plus extra examples like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;custom date and time patterns&lt;/li&gt;
&lt;li&gt;infer date pattern&lt;/li&gt;
&lt;li&gt;dates different language locales&lt;/li&gt;
&lt;li&gt;different date formats
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_datetime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;'date'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'%Y%m%d HH:MM:SS'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;errors&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;'ignore'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also it will show if a given string contains dates with fuzzy matching.&lt;/p&gt;

&lt;p&gt;Or mixed dates in a Pandas column:&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="k"&gt;if&lt;/span&gt; &lt;span class="s"&gt;'/'&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_datetime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;format&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'%Y/%m/%d'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="s"&gt;'-'&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_datetime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;format&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'%d-%m-%Y'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;to_datetime&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;format&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'%d.%m.%Y'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>pandas</category>
      <category>datascience</category>
      <category>date</category>
      <category>datascientyst</category>
    </item>
    <item>
      <title>SQL meet Data Science (Pandas) cheat sheet</title>
      <dc:creator>Softhints</dc:creator>
      <pubDate>Mon, 20 Jun 2022 10:14:03 +0000</pubDate>
      <link>https://dev.to/softhints/sql-meet-data-science-pandas-cheat-sheet-59jh</link>
      <guid>https://dev.to/softhints/sql-meet-data-science-pandas-cheat-sheet-59jh</guid>
      <description>&lt;p&gt;This is Pandas cheat sheet is intended for people who know SQL. The full version and high quality images are available here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://datascientyst.com/pandas-vs-sql-cheat-sheet/" rel="noopener noreferrer"&gt;Pandas vs SQL Cheat Sheet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The cheat sheet is divided into different sections and aims to help beginners in SQL and/or Pandas. It offers easy navigation, examples and beautiful visualizations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Flvoo6ttqfvlek2m44jqx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Flvoo6ttqfvlek2m44jqx.png" alt="SQL meet Pandas"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It includes most common SQL operations like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Select&lt;/li&gt;
&lt;li&gt;Where&lt;/li&gt;
&lt;li&gt;Like, and, or&lt;/li&gt;
&lt;li&gt;Group by&lt;/li&gt;
&lt;li&gt;Join&lt;/li&gt;
&lt;li&gt;Union&lt;/li&gt;
&lt;li&gt;Limit&lt;/li&gt;
&lt;li&gt;Update&lt;/li&gt;
&lt;li&gt;Delete&lt;/li&gt;
&lt;li&gt;Insert&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Plus extra materials like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Differences between SQL and Pandas&lt;/li&gt;
&lt;li&gt;Pandas to SQL&lt;/li&gt;
&lt;li&gt;Pandas from SQL&lt;/li&gt;
&lt;li&gt;Pandas and SQL with SQLAlchemy and PyMySQL&lt;/li&gt;
&lt;li&gt;Run SQL code in Pandas&lt;/li&gt;
&lt;li&gt;Generate SQL statements in Pandas&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enjoy :) &lt;/p&gt;

&lt;p&gt;This is the second part from a Pandas cheat sheet series.&lt;/p&gt;

</description>
      <category>sql</category>
      <category>python</category>
      <category>datascience</category>
      <category>datascientyst</category>
    </item>
    <item>
      <title>Data Science Cheat Sheet for Python &amp; Pandas</title>
      <dc:creator>Softhints</dc:creator>
      <pubDate>Fri, 10 Jun 2022 13:21:47 +0000</pubDate>
      <link>https://dev.to/softhints/data-science-cheat-sheet-for-python-pandas-564f</link>
      <guid>https://dev.to/softhints/data-science-cheat-sheet-for-python-pandas-564f</guid>
      <description>&lt;p&gt;A beautiful &lt;strong&gt;Python Cheat Sheet&lt;/strong&gt; useful for the aspiring data scientists and contains ready-to-use codes for data wrangling.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;cheat sheet summarize the most commonly used Pandas features and APIs&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Science Cheat Sheet with Pandas and Python&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://datascientyst.com/pandas-cheat-sheet-for-data-science/" rel="noopener noreferrer"&gt;&lt;strong&gt;Pandas Cheat Sheet for Data Science - full cheat sheet&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fnkft9vrijz5931e38b1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fnkft9vrijz5931e38b1l.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This cheat sheet will act as a &lt;strong&gt;crash course for Pandas beginners&lt;/strong&gt; and help you with various fundamentals of Data Science. It can be used by experienced users as a quick reference.&lt;/p&gt;

&lt;p&gt;The cheat sheet is part of series cheat sheets devoted to Data Science, Python and Pandas. Follow us for future versions on topics like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  data cleaning&lt;/li&gt;
&lt;li&gt;  data analytics&lt;/li&gt;
&lt;li&gt;  stats and math for data science&lt;/li&gt;
&lt;li&gt;  data wrangling&lt;/li&gt;
&lt;li&gt;  text processing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The full cheat sheet on the link above include&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Organized in sections&lt;/li&gt;
&lt;li&gt;  Easy copy &amp;amp; paste&lt;/li&gt;
&lt;li&gt;  Fast navigation&lt;/li&gt;
&lt;li&gt;  Beautiful visualization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;More resources&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://pandas.pydata.org/pandas-docs/stable/reference/index.html#api" rel="noopener noreferrer"&gt;Pandas API Reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://pandas.pydata.org/pandas-docs/stable/user_guide/index.html#user-guide" rel="noopener noreferrer"&gt;Pandas User Guide&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://pandas.pydata.org/Pandas_Cheat_Sheet.pdf" rel="noopener noreferrer"&gt;Data Wrangling with Pandas Cheat Sheet&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example Section:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fvumw9h9rgpk7hodec6vy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fvumw9h9rgpk7hodec6vy.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>7 Good Habits for Successful Programmers</title>
      <dc:creator>Softhints</dc:creator>
      <pubDate>Sat, 26 Sep 2020 08:31:21 +0000</pubDate>
      <link>https://dev.to/softhints/7-good-habits-for-successful-programmers-4e8k</link>
      <guid>https://dev.to/softhints/7-good-habits-for-successful-programmers-4e8k</guid>
      <description>&lt;p&gt;Let's get honest: learning and mastering programming doesn't happen by accident or talent. In my fifteen years in the IT industry I have learned a lot about what works and what doesn't - I've wanted to be a better programmer and I was experimenting and searching for it. &lt;/p&gt;

&lt;p&gt;The successful programmers who are able to reach the top and maintain it (finding nice job, working on interesting projects and getting high salary) &lt;strong&gt;share very similar habits which helped their progress&lt;/strong&gt;. These good habits aren't anything secret or difficult, but they allow individuals to progress day by day.&lt;/p&gt;

&lt;p&gt;I've compiled these habits of lucky professionals so we can all use them and enrich ourselves.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Minimize Time Lost
&lt;/h2&gt;

&lt;p&gt;Efficiency is about producing a specific outcome with a minimum amount of waste, expense or unnecessary effort. It is of high importance to divide your professional life to days, days to hours and hours to minutes. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical advice&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduce number of meetings&lt;/li&gt;
&lt;li&gt;Decline meetings without agenda&lt;/li&gt;
&lt;li&gt;Ignore long non professional talks&lt;/li&gt;
&lt;li&gt;Minimize social media time at work&lt;/li&gt;
&lt;li&gt;Don't multitask&lt;/li&gt;
&lt;li&gt;Prioritize and organize on daily/weekly basis&lt;/li&gt;
&lt;li&gt;Have long-term plan&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Less time sitting&lt;/li&gt;
&lt;li&gt;Focused work&lt;/li&gt;
&lt;li&gt;Dealing with harder problem&lt;/li&gt;
&lt;li&gt;Learn faster&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Sport! Sport! Sport!
&lt;/h2&gt;

&lt;p&gt;Select an appropriate sport for yourself and practice it as long as you can. It's preferable to be a competitive sport if you like to enrich your social life and meet other people. To lead a highly effective professional life, a healthy body and mind is a must. Sport is the perfect tool against mind exhaustion, depression and lack of motivation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical advice&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Always find time for sport - don't skip it because of work&lt;/li&gt;
&lt;li&gt;Get stuck on a hard task? - then go out for a walk or sport&lt;/li&gt;
&lt;li&gt;Don't work immediately after sport routine&lt;/li&gt;
&lt;li&gt;Find friends who share your sport interests&lt;/li&gt;
&lt;li&gt;Use workdays for indoor sports and enjoy active weekends outside in nature&lt;/li&gt;
&lt;li&gt;Do small sport routines at the office - even on the chair - exercise shoulders, legs etc&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mental health&lt;/li&gt;
&lt;li&gt;Self confidence&lt;/li&gt;
&lt;li&gt;Leadership skills&lt;/li&gt;
&lt;li&gt;Discipline&lt;/li&gt;
&lt;li&gt;Stress management&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Taking notes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;I don't know everything which I did before but I know where to find it!&lt;/strong&gt; Taking notes helps you retain more information and stay organized in highly complex areas like programming. &lt;strong&gt;The 15 minutes habit at the end of the working day is enough to make us more productive.&lt;/strong&gt; Never start a new day without knowing where to start or searching the whole day for something from the last month.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical advice&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use special app like &lt;a href="https://blog.softhints.com/how-to-install-typora-on-linux-mint/" rel="noopener noreferrer"&gt;Typora&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Research how other &lt;a href="https://blog.softhints.com/complete-guide-to-developing-a-powerful-documenation-lab-diary/" rel="noopener noreferrer"&gt;people do it&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Daily updates on documentation&lt;/li&gt;
&lt;li&gt;Once per week for analysis and reorganization&lt;/li&gt;
&lt;li&gt;Keep only important things in great detail&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stay organized&lt;/li&gt;
&lt;li&gt;Spend less time searching&lt;/li&gt;
&lt;li&gt;Use your brain and memory for important things&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Learn new things
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Make a habit of adding new skills whenever this is possible.&lt;/strong&gt; The more you know the more creative you will be. The process of learning makes life more interesting and keeps our brain healthy. Have you ever experienced the case where you were doing something for years and then suddenly you find an easier and faster way to do it? Remember it's not about how much you know now but &lt;strong&gt;what you don't know which might improve your life&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical advice&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Have fun while learning&lt;/li&gt;
&lt;li&gt;Experiment with new ideas, tools, methods&lt;/li&gt;
&lt;li&gt;Set apart time for discovery of new ideas&lt;/li&gt;
&lt;li&gt;Socializing and learning go together&lt;/li&gt;
&lt;li&gt;Test and adapt the new knowledge&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Becoming wiser&lt;/li&gt;
&lt;li&gt;Creativity&lt;/li&gt;
&lt;li&gt;Healthier brain &lt;/li&gt;
&lt;li&gt;Broaden your mind&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq3en29ndthiqdi22s55p.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq3en29ndthiqdi22s55p.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Meditate
&lt;/h2&gt;

&lt;p&gt;Meditation is an ancient form of searching your inner-self and the answers related to it. This practice survived thousands of years and reached our society because it works and it's accessible. But don't be deceived that it's easy to make it right. It's better to search or ask experienced people about it. &lt;strong&gt;The habit of meditation a few minutes daily will help you solve harder programming challenges with less mind effort.&lt;/strong&gt; Meditation is a habitual process of training your mind to focus and free yourself from thoughts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical advice&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do it on daily base&lt;/li&gt;
&lt;li&gt;Find nice peaceful place&lt;/li&gt;
&lt;li&gt;Find what time during the day works best - morning&lt;/li&gt;
&lt;li&gt;Use different meditation techniques and find what works better&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Improves Sleep&lt;/li&gt;
&lt;li&gt;Controls Anxiety&lt;/li&gt;
&lt;li&gt;Improves Emotional Health&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. Talk with more experienced
&lt;/h2&gt;

&lt;p&gt;Find someone successful and learn more about him. Why do you think that he is successful? Is there something he has that you don't? Find more experienced and successful people in your company - drink a coffee with them or have a walk. They have much more experience than you and can share interesting stories and life hacks. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical advice&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Become friend with such people&lt;/li&gt;
&lt;li&gt;Ask questions which will help your growth as a person&lt;/li&gt;
&lt;li&gt;Test and adapt useful experience of the others&lt;/li&gt;
&lt;li&gt;Surround with successful people and learn from them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;New friends which might help you&lt;/li&gt;
&lt;li&gt;Learn from others mistakes&lt;/li&gt;
&lt;li&gt;Sometimes practical knowledge is more important than theoretical knowledge&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  7. Enjoy the nature
&lt;/h2&gt;

&lt;p&gt;Spend more time outside in nature - everyday whenever you have this opportunity. Programming depends highly on memory and logical thinking. Walking in nature improves your short-term memory, frees your mind and boosts cognitive functioning. Forest walks are the most powerful way to fight with stressful states. As we know programming is related to stress - missing deadlines, hard problems, changing technologies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Practical advice&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Respect nature&lt;/li&gt;
&lt;li&gt;Dress for the weather&lt;/li&gt;
&lt;li&gt;Bring a bottle of water&lt;/li&gt;
&lt;li&gt;Socialize with other people who enjoy nature&lt;/li&gt;
&lt;li&gt;Meet friends in the parks not in the office buildings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Improved physical and mental health&lt;/li&gt;
&lt;li&gt;Reduce stress&lt;/li&gt;
&lt;li&gt;Enjoy experience of the most complex system&lt;/li&gt;
&lt;li&gt;Learn from the trees, birds, water&lt;/li&gt;
&lt;li&gt;Best ideas and simplest solution come in nature&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Best practices and good habits are easy to do for a few days or a week but almost impossible to stick to them for years. Remember 3 years are needed to learn a new habit and only 3 days to forget it! Be persistent and patient and only then you can get the benefits from those habits. Doing them from time to time is not enough if you like to go in the desired direction. I'll finish with:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What are we? What we do!&lt;br&gt;
How good we are? How and how much we do it!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Please do share your comments and ideas on this interesting topic. I would like to learn more!&lt;/p&gt;

&lt;p&gt;More interesting stories on softhints.com&lt;/p&gt;

</description>
      <category>habit</category>
      <category>beginners</category>
      <category>learn</category>
      <category>improve</category>
    </item>
    <item>
      <title>Simple Guide to Deal with Painful Programming Headache</title>
      <dc:creator>Softhints</dc:creator>
      <pubDate>Mon, 22 Jun 2020 16:15:46 +0000</pubDate>
      <link>https://dev.to/softhints/simple-guide-to-deal-with-painful-programming-headache-333b</link>
      <guid>https://dev.to/softhints/simple-guide-to-deal-with-painful-programming-headache-333b</guid>
      <description>&lt;p&gt;&lt;strong&gt;Does programming give you a headache?&lt;/strong&gt; Do you feel tired after few hours of coding? If so this article is for you. You will find most common reasons for programming migraine and how to relieve the pain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Identify the reason for the headache
&lt;/h2&gt;

&lt;p&gt;The first step is to find what is the reason for the headache. It's extremely important to identify what is the cause and what is the type of the headache. This will help you to treat it better and address the problem in right direction. Below you can find most popular reasons associated with programming headache:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Eye strain&lt;/li&gt;
&lt;li&gt;Bad colors / Dark theme(+ astigmatism)&lt;/li&gt;
&lt;li&gt;Bad posture&lt;/li&gt;
&lt;li&gt;Bad music / Noise&lt;/li&gt;
&lt;li&gt;Over-thinking&lt;/li&gt;
&lt;li&gt;Dehydration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once the type of headache(you are suffering from) and the reason are clear  you will know what practice to use to relieve it. In some cases, a head massage can help in others taking longer breaks. In the next step you can find how to ease the pain caused by headaches.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Tips to relieve coding migraine
&lt;/h2&gt;

&lt;p&gt;What are the best methods to relieve stress? I'll try to list the one which works for me. &lt;/p&gt;

&lt;h4&gt;
  
  
  Try Massage
&lt;/h4&gt;

&lt;p&gt;You can do it yourself, or simply ask a friend / a specialist.** A few minutes massaging your neck, top of the head and temples can ease a tension headache, which may result from stress**. You can also buy simple massager like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/gp/product/B07BGWXFG3/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B07BGWXFG3&amp;amp;linkCode=as2&amp;amp;tag=softhints-20&amp;amp;linkId=f83f688a4149ffdd3120776b129a95d0"&gt;Wooden Acupressure Massager with 5-Knobs - Multi-Knobs for Assorted Pressure Points for Deep Tissue Massage&lt;/a&gt;&lt;img src="//ir-na.amazon-adsystem.com/e/ir?t=softhints-20&amp;amp;l=am2&amp;amp;o=1&amp;amp;a=B07BGWXFG3" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/gp/product/B07QKSNPBR/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B07QKSNPBR&amp;amp;linkCode=as2&amp;amp;tag=softhints-20&amp;amp;linkId=337d1bab87863c12971b23b27ab8b621"&gt;Scalp Massagers with Wooden Handle by  Divine Light - Handheld Head Scratcher - No Snags, Tangles Head Massager - Stress Reliever Massage Tool for Home Spa Relief and Relaxation (5 Pack, Random Color)&lt;/a&gt;&lt;img src="//ir-na.amazon-adsystem.com/e/ir?t=softhints-20&amp;amp;l=am2&amp;amp;o=1&amp;amp;a=B07QKSNPBR" alt=""&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm using the first one and it really make the huge difference in the end of the long working day. After several minutes of massage I feel warming feeling which:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I can feel that all the way down in my toes!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Deal with Bad music / Noise
&lt;/h4&gt;

&lt;p&gt;I was working simultaneously in open office and from home for several years (on weekly basis). I found out that my performance from the office was bad and I was less productive. It was really hard for me to concentrate and focus on the task which I had for the day. &lt;strong&gt;At the end of the working day I had also - subtle pain in my forehead&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;I tried to change different things until I found the real cause for my suffers - the noise in the open space. The noise was on from the early morning till the late evening. Only when most workers were gone and the air-conditioner was off I was able to do something properly. What was &lt;strong&gt;the solution which helped me to deal with the constant noise&lt;/strong&gt;? It's called - &lt;strong&gt;Noise Canceling Headphones&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Below you can find two models which will do the job:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/gp/product/B07Q9MJKBV/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B07Q9MJKBV&amp;amp;linkCode=as2&amp;amp;tag=softhints-20&amp;amp;linkId=a10286b2cc24d59dd9513c7c03e10654"&gt;Bose Noise Cancelling Wireless Bluetooth Headphones 700, with Alexa Voice Control, Black&lt;/a&gt;&lt;img src="//ir-na.amazon-adsystem.com/e/ir?t=softhints-20&amp;amp;l=am2&amp;amp;o=1&amp;amp;a=B07Q9MJKBV" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/gp/product/B019U00D7K/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B019U00D7K&amp;amp;linkCode=as2&amp;amp;tag=softhints-20&amp;amp;linkIIf%20d=394efb7beed3171ef5021baca17471e7"&gt;COWIN E7 Active Noise Cancelling Headphones Bluetooth Headphones with Microphone Deep Bass Wireless Headphones Over Ear, Comfortable Protein Earpads, 30 Hours Playtime for Travel/Work, Black&lt;/a&gt;&lt;img src="//ir-na.amazon-adsystem.com/e/ir?t=softhints-20&amp;amp;l=am2&amp;amp;o=1&amp;amp;a=B019U00D7K" alt=""&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Be careful because bad music might be another reason for programming migraine. So I prefer to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Work on quite place in nature when it's possible&lt;/li&gt;
&lt;li&gt;If not - use noise canceling headphones with nature sounds&lt;/li&gt;
&lt;li&gt;Listen low acoustic music&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Dehydration
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Dehydration is one of the greatest migraine triggers&lt;/strong&gt;. It might be related to drinking alcohol, too many cups of coffee, too salty food or simply don't drinking water. The focus on hard problems or staying too long in front of computer might deceive your thirsty feeling.&lt;/p&gt;

&lt;p&gt;What could be done? You can &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;add a cup or bottle of water on your desk.&lt;/strong&gt; If the cup is present on your desk it's more likely to drink it. &lt;/li&gt;
&lt;li&gt;Frequent breaks will normalize your senses - so you will find if you are thirsty or not.&lt;/li&gt;
&lt;li&gt;Drinking tea&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Fix bad posture problem
&lt;/h4&gt;

&lt;p&gt;Incorrect posture causes migraine and back pain. Most probably there is muscle imbalance which can be treated in long term with sport, stretching and exercises.  In short term (or if you don't have 15 minutes per day for stretching) you can try to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;check if your monitor is ergonomically correct - the top 1/3 of the screen is at eye level.&lt;/li&gt;
&lt;li&gt;sit up straight&lt;/li&gt;
&lt;li&gt;avoid any prolonged stay&lt;/li&gt;
&lt;li&gt;&lt;p&gt;use ergonomic chair like:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.amazon.com/gp/product/B07VSVY7ML/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B07VSVY7ML&amp;amp;linkCode=as2&amp;amp;tag=softhints-20&amp;amp;linkId=8e4287ae53927220610cf3c09407539e"&gt;Fortnite OMEGA-Xi Gaming Chair, RESPAWN by OFM Reclining Ergonomic Chair with Footrest (OMEGA-02)&lt;/a&gt;&lt;a href="//ir-na.amazon-adsystem.com/e/ir?t=softhints-20&amp;amp;l=am2&amp;amp;o=1&amp;amp;a=B07VSVY7ML" class="article-body-image-wrapper"&gt;&lt;img src="//ir-na.amazon-adsystem.com/e/ir?t=softhints-20&amp;amp;l=am2&amp;amp;o=1&amp;amp;a=B07VSVY7ML" alt=""&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.amazon.com/gp/product/B07VSVY7ML/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B07VSVY7ML&amp;amp;linkCode=as2&amp;amp;tag=softhints-20&amp;amp;linkId=13cd431e90d18d8d35c633b73353e4f0"&gt;Fortnite OMEGA-Xi Gaming Chair, RESPAWN by OFM Reclining Ergonomic Chair with Footrest (OMEGA-02)&lt;/a&gt;&lt;a href="//ir-na.amazon-adsystem.com/e/ir?t=softhints-20&amp;amp;l=am2&amp;amp;o=1&amp;amp;a=B07VSVY7ML" class="article-body-image-wrapper"&gt;&lt;img src="//ir-na.amazon-adsystem.com/e/ir?t=softhints-20&amp;amp;l=am2&amp;amp;o=1&amp;amp;a=B07VSVY7ML" alt=""&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep in mind that the long term goal is to stay less on the chair and be healthy. Even the most ergonomic chair will not help if you have bad habits.  The key point here is to cure the muscle imbalance.&lt;/p&gt;

&lt;h4&gt;
  
  
  Bad colors / Dark theme(+ astigmatism)
&lt;/h4&gt;

&lt;p&gt;There are studies that show some fonts and colors can result in migraine headache. Monitor screen colors, color theme, dark mode can be considered as  triggers. For example dark mode theme in combination with astigmatism result in eye strain for me.&lt;/p&gt;

&lt;p&gt;Best option here is to experiment with different setups and applications. Most probably your monitor have native option for regulating the working regime like - I-Style color:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Standard&lt;/li&gt;
&lt;li&gt;Game&lt;/li&gt;
&lt;li&gt;Cinema&lt;/li&gt;
&lt;li&gt;Scenery&lt;/li&gt;
&lt;li&gt;Text&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I found out the Text regime is best working for me. &lt;strong&gt;In combination with programs like Red-Shift which decrease the levels of the blue light - I solved the headache related to colors and intense light.&lt;/strong&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Decrease eye strain
&lt;/h4&gt;

&lt;p&gt;Another common problem is eye strain. It can be related to many factors like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;wrong view angle&lt;/li&gt;
&lt;li&gt;staying for too long of monitor&lt;/li&gt;
&lt;li&gt;bad or no light&lt;/li&gt;
&lt;li&gt;bad / old monitor&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can try to change the position of your desk - closer or further from a window. To decrease direct sunlight or change the direction of your monitor. Play with the level and the inclination of the monitor. &lt;/p&gt;

&lt;p&gt;Change of fonts and resolution is another option. If you read text in your browser you can increase the font size. &lt;strong&gt;A simple trick which helped me a lot in the past is to rinse my eyes with cold water&lt;/strong&gt;. I did this regularly for one month and the headache which I had at that time due to bad monitor - disappear completely.&lt;/p&gt;

&lt;p&gt;Buying a new monitor still can be an option. You can find some ideas below:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/gp/product/B07KGR784M/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B07KGR784M&amp;amp;linkCode=as2&amp;amp;tag=softhints-20&amp;amp;linkId=e4f9dd36e0bc2e603dfcc112599cc1b6"&gt;Dell Ultrasharp U2719DX 27-Inch WQHD 2560x1440 Resolution IPS Monitor with Infinity Edge Bezels, Black&lt;/a&gt;&lt;img src="//ir-na.amazon-adsystem.com/e/ir?t=softhints-20&amp;amp;l=am2&amp;amp;o=1&amp;amp;a=B07KGR784M" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/gp/product/B01K1INYWG/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B01K1INYWG&amp;amp;linkCode=as2&amp;amp;tag=softhints-20&amp;amp;linkId=3bdcf7924c5bcc2d4801d5b14111386d"&gt;BenQ PD2700Q 27 inch QHD 1440p IPS Monitor | 100% sRGB | AQCOLOR Technology for Accurate Reproduction&lt;/a&gt;&lt;img src="//ir-na.amazon-adsystem.com/e/ir?t=softhints-20&amp;amp;l=am2&amp;amp;o=1&amp;amp;a=B01K1INYWG" alt=""&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.amazon.com/gp/product/B075CZD4YF/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=B075CZD4YF&amp;amp;linkCode=as2&amp;amp;tag=softhints-20&amp;amp;linkId=1a95b26dabe9441e97a3dc982310fcf0"&gt;Iiyama 24 1920x1080, 4ms, AMVA panel 13cm Adj. Stand, 250cd/m, XB2483HSU-B3 (13cm Adj. Stand, 250cd/m, VGA, DisplayPort, HDMI, USB-HUB, Speakers)&lt;/a&gt;&lt;img src="//ir-na.amazon-adsystem.com/e/ir?t=softhints-20&amp;amp;l=am2&amp;amp;o=1&amp;amp;a=B075CZD4YF" alt=""&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Over-thinking
&lt;/h4&gt;

&lt;p&gt;Don't try so hard.  Take  difficult problems easy and step by step. Take your mind off the problem, switch to something else, just relax or simply enjoy the day outside. Do take an afternoon nap to rest your brain, eyes and nerve system. &lt;/p&gt;

&lt;p&gt;Attack the problem from different angle or ask for help. Think deeply for simple things requires a lot of energy and mental strain. Try to balance it with the same amount of relaxation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3:  Tips for prevention of coding migraine
&lt;/h2&gt;

&lt;p&gt;In addition to previous steps you can find several simple things which you can do to ease the pain. Try these tips and get to feeling better:&lt;/p&gt;

&lt;h4&gt;
  
  
  Meditation
&lt;/h4&gt;

&lt;p&gt;Meditation play huge role in the connection between our internal and external worlds. It helps to controls anxiety, promotes emotional health, fight stress and enhance focus. Start short meditation sessions on daily basis and you will find a clear picture of your mind. By improving attention and concentration you will solve problems faster with less mental power.&lt;/p&gt;

&lt;h4&gt;
  
  
  Frequent walks
&lt;/h4&gt;

&lt;p&gt;The benefits of nature walks are difficult to be listed in a short article like this. But definitively one of them is - headache and stress prevention. The more time you spent out in the nature the more you will benefit from reduction in stress levels and burn out probability. &lt;/p&gt;

&lt;p&gt;For sure nature walks improve concentration which will help you solve hard problems much faster and with less efforts. Fresh air is the natural food for your brain. Quick walk during the work day may do the difference between successful worker and struggler.&lt;/p&gt;

&lt;p&gt;Pro Tip: You can remove your glasses when you walk in the nature or outside.  This helps me to relax my eyes and mind (I have average near-sightedness). But please be careful!&lt;/p&gt;

&lt;h4&gt;
  
  
  Afternoon naps and more sleep
&lt;/h4&gt;

&lt;p&gt;Do you know what is common between: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Aristotle&lt;/li&gt;
&lt;li&gt;Leonardo Da Vinci&lt;/li&gt;
&lt;li&gt;Albert Einstein&lt;/li&gt;
&lt;li&gt;Thomas Edison&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At least one thing which I know was their love for naps. Working as a programmer is mental draining occupation which requires long periods of concentration. One of the ways to rest from this long periods is by sleeping and switching off your brain for some time.&lt;/p&gt;

&lt;p&gt;Sleep is extremely important for memory, concentration and relax of the mind. 8 hours of strong sleep is a good recipe for headache killer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;People who suffer from programming headache are susceptible to a number of factors that can trigger and boost such condition. Programing is related to staring at code all day with intense concentration which is challenging from a vision and mental perspective. &lt;/p&gt;

&lt;p&gt;In combination with bad sleep habits, not drinking enough water, eating unhealthy food, constantly rushing deadlines might result in headache and stress.&lt;/p&gt;

&lt;p&gt;What we could do to prevent headache is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;take regular short breaks to give your eyes and brain a rest&lt;/li&gt;
&lt;li&gt;going for walk. Walking outside will clear your head, improves your productivity and give you fresh energy&lt;/li&gt;
&lt;li&gt;live more active live - include sport and stretching in your daily routine&lt;/li&gt;
&lt;li&gt;focus on small things like: drinking a cup of water, stare at distant object, afternoon nap or chat with colleague.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>productivity</category>
      <category>health</category>
      <category>coding</category>
      <category>bestpractice</category>
    </item>
    <item>
      <title>How to Install Oracle JDK in Ubuntu 18 in 2020</title>
      <dc:creator>Softhints</dc:creator>
      <pubDate>Tue, 05 Nov 2019 14:02:32 +0000</pubDate>
      <link>https://dev.to/softhints/how-to-install-oracle-jdk-in-ubuntu-18-in-2020-10dm</link>
      <guid>https://dev.to/softhints/how-to-install-oracle-jdk-in-ubuntu-18-in-2020-10dm</guid>
      <description>&lt;p&gt;In this short guide, I'll show you the new way of installation Oracle JDK: 8, 11 or 13 on Ubuntu 18 or Linux Mint 19 (and above). There are many articles describing the old steps which are not working anymore due to changes from Oracle. Below you can find the whole process - step by step.&lt;/p&gt;

&lt;p&gt;Note 1: If you need OpedJDK then you can install it with command like: &lt;code&gt;sudo apt-get install openjdk-8-jdk&lt;/code&gt; or by using &lt;a href="https://sdkman.io/"&gt;SDKMAN&lt;/a&gt; - I prefer to use SDKMAN which gives many benefits like working with different versions and easy updates.&lt;/p&gt;

&lt;p&gt;Note 2: Be sure that you read the &lt;a href="https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"&gt;Important Oracle JDK License Update&lt;/a&gt; before using Oracle JDK.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1. Create Oracle account and download Oracle JDK
&lt;/h2&gt;

&lt;p&gt;First in order to avoid confusion there are two Java downloads:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.java.com/en/download/linux_manual.jsp"&gt;Java Downloads for Linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.oracle.com/technetwork/java/javase/downloads/index.html"&gt;Java SE Downloads&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The second one is the one which has JDK and can be used for development. It's hosted on the Oracle website and needs Oracle account in order to download the JDK. Once the download is complete you can chose the Java version that you want to download - i.e. (or get recent from the link above):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"&gt;Java SE Development Kit 8 Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html"&gt;Java SE Development Kit 11 Downloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.oracle.com/technetwork/java/javase/downloads/jdk13-downloads-5672538.html"&gt;Java SE Development Kit 13 Downloads&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For Ubuntu/Linux Mint you need to download &lt;code&gt;.tar.gz&lt;/code&gt; file for your architectuer: 32 or 64 Bits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2. Install Oracle JDK in /usr/lib/jvm
&lt;/h2&gt;

&lt;p&gt;I check huge amount of articles trying to find what is the best place to install oracle JDK on Ubuntu. There are different choices so I decided to select:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/usr/lib/jvm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;which was the previous installation place for Oracle JDK 8.&lt;/p&gt;

&lt;p&gt;Once the download is complete you can move the &lt;code&gt;.tar.gz&lt;/code&gt; file to the folder of installation and extract it there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;Downloads
&lt;span class="nb"&gt;sudo mv &lt;/span&gt;jdk-8u231-linux-x64.tar.gz /usr/lib/jvm/
&lt;span class="nb"&gt;sudo tar &lt;/span&gt;xzvf jdk-8u231-linux-x64.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will install the JDK in folder - &lt;code&gt;jdk1.8.0_231&lt;/code&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/usr/lib/jvm/jdk1.8.0_231
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Step 3. Configure Java for update-alternatives (optional)
&lt;/h2&gt;

&lt;p&gt;This step is needed in order to make newly installed Java visible for &lt;code&gt;update-alternatives&lt;/code&gt;. What you need to do is:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;update-alternatives &lt;span class="nt"&gt;--install&lt;/span&gt; /usr/bin/java java /usr/lib/jvm/jdk1.8.0_231/bin/java 1
&lt;span class="nb"&gt;sudo &lt;/span&gt;update-alternatives &lt;span class="nt"&gt;--install&lt;/span&gt; /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_231/bin/javac 1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now if there are more than one Java version you can manage then easily by:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;update-alternatives &lt;span class="nt"&gt;--config&lt;/span&gt; java
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then select the best Java for your machine(in the example below Oracle JDK is not installed):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;There are 2 choices &lt;span class="k"&gt;for &lt;/span&gt;the alternative java &lt;span class="o"&gt;(&lt;/span&gt;providing /usr/bin/java&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt;

  Selection    Path                                            Priority   Status
&lt;span class="nt"&gt;------------------------------------------------------------&lt;/span&gt;
&lt;span class="k"&gt;*&lt;/span&gt; 0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1101      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1101      manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

Press &amp;lt;enter&amp;gt; to keep the current choice[&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;, or &lt;span class="nb"&gt;type &lt;/span&gt;selection number: 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4. Set up variable JAVA_HOME (optional)
&lt;/h2&gt;

&lt;p&gt;Many programs depends on environmental variable JAVA_HOME. So it's a good idea to set it up in order to avoid problems later. The setup of this variable for Debian based systems can be done by opening user profile settings:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you need to add somewhere near the bottom of the file:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_231
export PATH=$JAVA_HOME/bin:$PATH
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then you need to reset the terminal (by command &lt;code&gt;source ~/.bashrc&lt;/code&gt;) or open new one and test the variable by &lt;code&gt;echo&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$JAVA_HOME&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this last step the installation of Oracle JDK 8 on Ubuntu/Linux Mint/Debian is complete.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus: The scripts for installation of Oracle JDK 11 or 13
&lt;/h2&gt;

&lt;p&gt;Download &lt;strong&gt;Oracle JDK 11&lt;/strong&gt; (the link is above) from the site and then execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo mv &lt;/span&gt;jdk-11.0.5_linux-x64_bin.tar.gz /usr/lib/jvm/
&lt;span class="nb"&gt;tar &lt;/span&gt;xzvf jdk-11.0.5_linux-x64_bin.tar.gz
&lt;span class="nb"&gt;sudo &lt;/span&gt;update-alternatives &lt;span class="nt"&gt;--install&lt;/span&gt; /usr/bin/java java /usr/lib/jvm/jdk-11.0.5/bin/java 11
&lt;span class="nb"&gt;sudo &lt;/span&gt;update-alternatives &lt;span class="nt"&gt;--install&lt;/span&gt; /usr/bin/javac javac /usr/lib/jvm/jdk-11.0.5/bin/javac 11
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Download &lt;strong&gt;Oracle JDK 13&lt;/strong&gt; (the link is above) from the site and then execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo mv &lt;/span&gt;jdk-13.0.1_linux-x64_bin.tar.gz /usr/lib/jvm/
&lt;span class="nb"&gt;tar &lt;/span&gt;xzvf jdk-13.0.1_linux-x64_bin.tar.gz
&lt;span class="nb"&gt;sudo &lt;/span&gt;update-alternatives &lt;span class="nt"&gt;--install&lt;/span&gt; /usr/bin/java java /usr/lib/jvm/jdk-13.0.1/bin/java 13
&lt;span class="nb"&gt;sudo &lt;/span&gt;update-alternatives &lt;span class="nt"&gt;--install&lt;/span&gt; /usr/bin/javac javac /usr/lib/jvm/jdk-13.0.1/bin/javac 13
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: if you wonder what are the numbers at the end of this command then this is the explanation:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a priority number. The highest the number, the higher the priority. That means that the alternative with the highest number will be executed by default, unless we manually set which is the default.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Resources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.oracle.com/technetwork/java/javase/downloads/index.html"&gt;Java Donwloads&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html"&gt;Linux 64-bit installation instructions for Java&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>java</category>
    </item>
    <item>
      <title>Complete list of 10 best Python IDEs and Code editors of 2020</title>
      <dc:creator>Softhints</dc:creator>
      <pubDate>Sun, 03 Nov 2019 08:26:24 +0000</pubDate>
      <link>https://dev.to/softhints/complete-list-of-10-best-python-ides-and-code-editors-of-2020-50g2</link>
      <guid>https://dev.to/softhints/complete-list-of-10-best-python-ides-and-code-editors-of-2020-50g2</guid>
      <description>&lt;p&gt;What python IDE to chose in 2020? The main purpose of this article is to show comprehensive list best and most popular Python IDEs for programming and education that make learning and coding much easier! &lt;/p&gt;

&lt;p&gt;The information is based on personal experience, public web data and several surveys like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.jetbrains.com/research/python-developers-survey-2018/"&gt;Python Developers Survey 2018 Results / Editors and IDEs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pypl.github.io/IDE.html"&gt;Top IDE index - pypl&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The list of best Python IDEs and Code editors for 2020:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.jetbrains.com/pycharm/"&gt;PyCharm ( Professional and Community edition)&lt;/a&gt; - Python integrated development environment specifically designed for the Python language.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://code.visualstudio.com/"&gt;VS Code&lt;/a&gt; - Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. If you are working on multi-language web project which needs python then you can give it a try.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.vim.org/"&gt;Vim&lt;/a&gt; - Vim is a highly configurable text editor with good support for Python&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.sublimetext.com/"&gt;Sublime&lt;/a&gt; - Sublime Text is a sophisticated text editor for code; Many packages can make it fully functional python IDE&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://jupyter.org/"&gt;Jupyter Notebook&lt;/a&gt; - is a web-based interactive development environment; It's well known in data science community for analyzing, sharing and presenting information&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://atom.io/"&gt;Atom&lt;/a&gt; - multi-platform simplistic source code editor. It makes collaborating on code just as easy as it is to code alone. Many packages and ecosystem can convert the code editor into nice python IDE.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.python.org/3/library/idle.html"&gt;IDLE&lt;/a&gt; - comes with python. IDLE has two main window types, the Shell window and the Editor window. Perfect python tool for people starting with programming and python.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.gnu.org/software/emacs/"&gt;GNU Emacs&lt;/a&gt; - An extensible, customizable, free text editor - and more. It was popular choice for python in the past which lost his glory recent years.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.eclipse.org/"&gt;Eclipse&lt;/a&gt; + &lt;a href="https://www.pydev.org/"&gt;PyDev&lt;/a&gt; - PyDev is a Python IDE for Eclipse. PyDev had huge problems in the past with stability and performance. This pytonic tool is evolving so waiting for good news in future.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.jetbrains.com/help/idea/plugin-overview.html"&gt;IntelliJ and Python Plugin&lt;/a&gt; - Python plugin extends IntelliJ IDEA with the full-scale functionality for Python. Projects which needs Java and Python can be developed with ease in IntelliJ&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.spyder-ide.org/"&gt;Spyder&lt;/a&gt; - Spyder is a powerful scientific environment written in Python, for Python, and designed by and for scientists, engineers and data analysts.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://repl.it/languages/python3"&gt;Online Python IDE - repl&lt;/a&gt; - Write simple Python code and run it in your browser; includes some basic snippets and examples&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tabular comparison of the IDE/Source editor in 2020
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;IDE&lt;/th&gt;
&lt;th&gt;Personal Score&lt;/th&gt;
&lt;th&gt;Level&lt;/th&gt;
&lt;th&gt;Price&lt;/th&gt;
&lt;th&gt;Debugging&lt;/th&gt;
&lt;th&gt;Light-weight&lt;/th&gt;
&lt;th&gt;IDE&lt;/th&gt;
&lt;th&gt;Multi-language&lt;/th&gt;
&lt;th&gt;Projects&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;PyCharm Professional&lt;/td&gt;
&lt;td&gt;★★★★★&lt;/td&gt;
&lt;td&gt;Advanced+&lt;/td&gt;
&lt;td&gt;Paid&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔ (limited)&lt;/td&gt;
&lt;td&gt;Various/Big&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PyCharm Community&lt;/td&gt;
&lt;td&gt;★★★★★&lt;/td&gt;
&lt;td&gt;Beginner, Advanced&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔ (limited)&lt;/td&gt;
&lt;td&gt;Various/Big&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;VS Code&lt;/td&gt;
&lt;td&gt;★★★★&lt;/td&gt;
&lt;td&gt;Advanced&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;plugin&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;Web/Big&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Vim&lt;/td&gt;
&lt;td&gt;★★★★&lt;/td&gt;
&lt;td&gt;Advanced+&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;pdb&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;Various/Big&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sublime&lt;/td&gt;
&lt;td&gt;★★★★★&lt;/td&gt;
&lt;td&gt;Advanced&lt;/td&gt;
&lt;td&gt;Free (*)&lt;/td&gt;
&lt;td&gt;package&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;Various/Mid&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Jupyter Notebook&lt;/td&gt;
&lt;td&gt;★★★★&lt;/td&gt;
&lt;td&gt;Beginner, Advanced&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✔ (limited)&lt;/td&gt;
&lt;td&gt;Data-science&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Atom&lt;/td&gt;
&lt;td&gt;★★★&lt;/td&gt;
&lt;td&gt;Beginner, Advanced&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;package&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;Various/Mid&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IDLE&lt;/td&gt;
&lt;td&gt;★★&lt;/td&gt;
&lt;td&gt;Beginner&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;Small scripts&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Emacs&lt;/td&gt;
&lt;td&gt;★★★&lt;/td&gt;
&lt;td&gt;Advanced+&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;package&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;Various&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Eclipse + PyDev&lt;/td&gt;
&lt;td&gt;★★★&lt;/td&gt;
&lt;td&gt;Advanced/Mid&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;Various&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;IntelliJ and Python Plugin&lt;/td&gt;
&lt;td&gt;★★★★&lt;/td&gt;
&lt;td&gt;Advanced&lt;/td&gt;
&lt;td&gt;Free (*)&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;Various&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spyder&lt;/td&gt;
&lt;td&gt;★★★★&lt;/td&gt;
&lt;td&gt;Advanced+&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✔ (limited)&lt;/td&gt;
&lt;td&gt;Data-science&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Online Python IDE&lt;/td&gt;
&lt;td&gt;★★&lt;/td&gt;
&lt;td&gt;Beginner&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✔&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;✘&lt;/td&gt;
&lt;td&gt;Small scripts&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What question helps to find optimal tool for Python?
&lt;/h2&gt;

&lt;p&gt;The popularity of code editors is decreasing with the years but they are far from dead. There are many people who still use "old school" tools like: vim, emacs, plain text editors etc - which write beautiful code and interesting projects. The questions below try to help novice in programming ( or people who want to try something new )  how to choose optimal choice for them.&lt;/p&gt;

&lt;p&gt;Important questions which will help you to find the optimal tool for you:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;IDE vs Text/Code Editor - because of plugins and additional tools is hard to draw the line.

&lt;ul&gt;
&lt;li&gt;Integrated development environment (IDE) is feature rich tool which provides facilities like debugging, autocomplete, support for environments, project setup, project structure, console etc&lt;/li&gt;
&lt;li&gt;Text/Code Editor - a tool for editing and modifying the code mainly.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: With good plugin/package ecosystem the simple source editor might become lightweight but powerful IDE (it's matter of configuration and experience)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;What is your level?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;beginner - IDLE (even online python editors) is perfect choice for the first steps in python language. In my opinion PyCharm is good choice for beginners - with some help from more experienced friend.&lt;/li&gt;
&lt;li&gt;mid - PyCharm, Sublime, Atom, Vs Code&lt;/li&gt;
&lt;li&gt;advanced - PyCharm, Vim, Emacs, Sublime, Atom, Vs Code&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;What do you (plan to)do with python?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;web development - PyCharm Professional, VS Code&lt;/li&gt;
&lt;li&gt;data science - Spyder, Jupyter Notebook, PyCharm Professional&lt;/li&gt;
&lt;li&gt;scripting - Sublime, Atom, PyCharm Community, Eclipse + PyDev&lt;/li&gt;
&lt;li&gt;QA - Sublime, Atom, PyCharm Community, Jupyter Notebook&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;What is your environment/OS?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multiple/mixed OS - PyCharm, Sublime, Atom&lt;/li&gt;
&lt;li&gt;Linux, macOS - PyCharm, Sublime, Atom, Vim, Jupyter&lt;/li&gt;
&lt;li&gt;Windows - Sublime, VS Code, Eclipse + PyDev, PyCharm&lt;/li&gt;
&lt;li&gt;Web only - Online Python IDE-s&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;What hardware do you have?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;bad - IDLE, Atom, Sublime, Online Editor&lt;/li&gt;
&lt;li&gt;good - PyCharm, VS Code, Eclipse + PyDev&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Programming languages&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;only python - IDLE, Atom, Sublime, PyCharm, Vim&lt;/li&gt;
&lt;li&gt;python + more (Java etc) - IntelliJ, VS code&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note: Most of the answers are based on personal experience and my work with  programmers with different background and knowledge. Also there are many other points to be considered as budget, git integration, team work, previous programming knowledge.&lt;/p&gt;

&lt;h2&gt;
  
  
  List of best Python IDE in 2020
&lt;/h2&gt;

&lt;p&gt;Now it's time for (from a python developer with 4+ years in python, and developer with 14+ years in coding) top python IDEs / Code editors with description which I'll use or try in 2020. There is sections with pros/cons, how I'm using the IDE, what projects are used etc.&lt;/p&gt;

&lt;h3&gt;
  
  
  Most used Python IDEs
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. PyCharm
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;version&lt;/strong&gt; - 2019.2.3 (expected version PyCharm 2020.1 in 2020)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://confluence.jetbrains.com/display/PYH/PyCharm+2019.2+Release+Notes"&gt;PyCharm Release Notes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.jetbrains.com/pycharm/category/announcement/"&gt;PyCharm Release Announcements&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;It has huge arsenal of features like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Highly customizable - some examples:

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blog.softhints.com/pycharm-2019-change-file-association-file-types/"&gt;PyCharm Change file association&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.softhints.com/pycharm-exclude-folders-from-indexing-find-and-show-usages/"&gt;Exclude files from indexing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.softhints.com/intellij-pycharm-surround-string-quote/"&gt;Surrond strings with Quotes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Intelligent Assistance for Code&lt;/li&gt;
&lt;li&gt;Powerful debugger - &lt;a href="https://dev.toIntelliJ%20Debug,%20conditional%20breakpoints%20and%20step%20back"&gt;IntelliJ Debug, conditional breakpoints and step back&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The fastest switching between files I've ever seen&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=cva2sxX5PgM"&gt;It has nice performance and beauty&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Good support for git and version control&lt;/li&gt;
&lt;li&gt;PyCharm has a very good support for virtualenvs.&lt;/li&gt;
&lt;li&gt;It's maintained and has two versions: paid ( Professional) and free (Community - open source)

&lt;ul&gt;
&lt;li&gt;I used the free one - because it's enough for my needs&lt;/li&gt;
&lt;li&gt;There is also one more - Education - for students&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;It has multiple windows/views:

&lt;ul&gt;
&lt;li&gt;version control&lt;/li&gt;
&lt;li&gt;code structure - working great for code but also for JSON, YAML etc&lt;/li&gt;
&lt;li&gt;terminal&lt;/li&gt;
&lt;li&gt;run / Debugger window&lt;/li&gt;
&lt;li&gt;project structure&lt;/li&gt;
&lt;li&gt;to do lists&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Script / Configuration editor&lt;/li&gt;
&lt;li&gt;Code / Python specific refactoring&lt;/li&gt;
&lt;li&gt;Project and code navigation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;I'm working on many different projects 25+. All of them different in nature, environments, code style and git setup (bitbucket and github), non python files like json, yaml and markdown. &lt;/p&gt;

&lt;p&gt;Python projects per size:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;small - several python files plus configuration is the whole project&lt;/li&gt;
&lt;li&gt;medium - several folders with python files and configuration&lt;/li&gt;
&lt;li&gt;big - hundreds of files&lt;/li&gt;
&lt;li&gt;huge - thousands of python files, configurations, integration of different API-s&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Projects by type:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;data science&lt;/strong&gt; - some of the projects are related to data science (beginner to medium level) - time estimation, error detection&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;data quality&lt;/strong&gt; - frameworks responsible for data quality and analysis of data anomalies, finding outliers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;automation&lt;/strong&gt; - automation of various tasks like data collection, notifications, summary and report generation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;office automation&lt;/strong&gt; - create office documents, parse hundreds of xls/csv files, create doc files, parse PDF files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'm using PyCharm on daily basis. Using it for several hours in a row without distraction (it has Distraction Free mode). In general I work with 1 open project at a time. From time to time I can open second or third project or additional file in separate window.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nice/Python plugins&lt;/strong&gt; - 1700+ plug-ins available&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=SsX9Fl958W0"&gt;Chronomorph&lt;/a&gt; - automatic change of dark and light theme based on time&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://plugins.jetbrains.com/plugin/10037-csv-plugin"&gt;CSV plugin&lt;/a&gt; - nice lightweight table editor for CSV files&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.jetbrains.com/help/pycharm/using-product-as-the-vim-editor.html"&gt;IdeaVim&lt;/a&gt; - Vim emulation for PyCharm&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://plugins.jetbrains.com/plugin/6632-r-language-for-intellij"&gt;R Language for IntelliJ&lt;/a&gt; - perform various statistical computing&lt;/li&gt;
&lt;li&gt;&lt;a href="https://plugins.jetbrains.com/plugin/7793-markdown"&gt;Markdown&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://plugins.jetbrains.com/plugin/7792-yaml-ansible-support"&gt;YAML/Ansible support&lt;/a&gt; - support for YAML&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most of the plugins come preinstalled with PyCharm so you don't need to do anything more. This is nice advantage for PyCharm. If you want to check plugins installed in PyCharm then you can do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Settings - CTRL + ALT + S
&lt;/li&gt;
&lt;li&gt;Plugins&lt;/li&gt;
&lt;li&gt;Installed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free version&lt;/li&gt;
&lt;li&gt;It has standard and similar way of working between Idea products - IntelliJ and PyCharm. Considered myself as a Java and Python programmer this is a huge advantage - being able to work in same manner with Java or Python.&lt;/li&gt;
&lt;li&gt;Big community and resources &lt;a href="https://www.youtube.com/watch?v=eq3KiAH4IBI"&gt;productivity guides - 42 IntelliJ IDEA Tips and Tricks&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;It helps to focus on important part (coding) and not on organizing, searching and style setup&lt;/li&gt;
&lt;li&gt;Cross-platform and easy for installation/integration

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blog.softhints.com/install-python-3-7-setup-pycharm-linux-mint/"&gt;Python 3.7 / PyCharm setup for Linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=cDOlBRzHRI0"&gt;Easy install of Python and PyCharm on Windows&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=XQjyjn3MdxM"&gt;Install IntelliJ/PyCharm on Ubuntu&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It requires high amount of RAM for medium and big projects. &lt;/li&gt;
&lt;li&gt;Some of the features are included only in the paid version - for example support for Notebooks or web projects&lt;/li&gt;
&lt;li&gt;It requires some time to adopt all features and productivity guides&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--YCwaS_4y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/w3y1xyqu5zx1zxz23w21.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--YCwaS_4y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/w3y1xyqu5zx1zxz23w21.png" alt="pycharm_best_python_ide_2020" width="800" height="606"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Jupyter Notebook
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;version&lt;/strong&gt; - 6.0.1 (Releases can be tracked here: &lt;a href="https://github.com/jupyter/notebook/releases"&gt;jupyter/notebook releases&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Jupyter Notebook become a standard in data science world because it's powerful, easy for working for developers and easy to present at the same time. Many organization and companies use it in their everyday work.&lt;/p&gt;

&lt;p&gt;Interesting Features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blog.softhints.com/ipython-jupyter-tricks-advanced-2019/"&gt;Jupyter notebooks magics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Markdown and HTML integration&lt;/li&gt;
&lt;li&gt;Support different kernels - helps working with Languages like Julia, R etc&lt;/li&gt;
&lt;li&gt;Versioning with git&lt;/li&gt;
&lt;li&gt;Visual representation&lt;/li&gt;
&lt;li&gt;Easy automation and integration for Linux

&lt;ul&gt;
&lt;li&gt;generating notebooks&lt;/li&gt;
&lt;li&gt;summarizing information&lt;/li&gt;
&lt;li&gt;starting and stoping servers, opening folders and files&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.softhints.com/ubuntu-18-how-to-install-jupyter-notebook/"&gt;Easy installation and setup&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7e7aMcFc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/3pt2oi9n4d6eqkpkhz5n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7e7aMcFc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/3pt2oi9n4d6eqkpkhz5n.png" alt="jupyter_notebook_best_python_ides_2020" width="800" height="663"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I have several environments with jupyter servers organized by projects and topics. Using it on daily basis for 1 or 2 hours per day. Automated scripts process web data and extract only important results for me - saving me huge amount of time or replacing one person who will need to do it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I use it primary for data quality, automation QA and trend/error detection. Working with CSV, text and JSON files. Analyzing datasets and store temporary results. Share findings and code snippets. &lt;/p&gt;

&lt;p&gt;Here you can find small collection of my notebooks: &lt;a href="https://github.com/softhints/python"&gt;Jupyter notebooks and datasets for the interesting pandas/python/data science video series.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nice/Python nbextensions&lt;/strong&gt;&lt;br&gt;
What is nbextensions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The nbextensions contains a collection of extensions that add functionality to your Jupyter notebook.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;All below can be installed and enabled from: &lt;a href="https://github.com/minrk/ipython_extensions"&gt;Miscellaneous IPython and Jupyter extensions&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/minrk/ipython_extensions"&gt;Table of Contents&lt;/a&gt; - add table of content (TOC) to your jupyter notebooks - extremely handy for huge notebooks with hundreds cells&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/minrk/ipython_extensions"&gt;Variable inspector&lt;/a&gt; - show information about variables created in the notebook like: name, value, type, size&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/minrk/ipython_extensions"&gt;Hide Code input&lt;/a&gt; - focus on the results while hide the code. This is extremely useful when you need to share the notebook with non it representative which are afraid of seeing source code&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/minrk/ipython_extensions"&gt;Autopep8&lt;/a&gt; - helps to write code formatted by PEP8 standard. Most of the time working with notebooks we focus on data and results but forget about the code style and format which makes the code hard to read later.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cross-platform&lt;/li&gt;
&lt;li&gt;Free&lt;/li&gt;
&lt;li&gt;Markdown support&lt;/li&gt;
&lt;li&gt;Multi language/environment support by Kernels&lt;/li&gt;
&lt;li&gt;Popular standard in Python world&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;difficult debugging&lt;/li&gt;
&lt;li&gt;required automation for big projects&lt;/li&gt;
&lt;li&gt;There is a need of organization of folders and files - otherwise very soon it will become nightmare for finding and navigating in such projects&lt;/li&gt;
&lt;li&gt;It needs best practices and time for management

&lt;ul&gt;
&lt;li&gt;For example file naming - &lt;code&gt;20191027-XXXX-report&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;add code/documentation for code cells - I have notebooks with hundreds of cells - it's not very nice to work with them after one or two years&lt;/li&gt;
&lt;li&gt;Avoid duplication and repeated work by using templates&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;sometimes information can be lost if there isn't good backup solution ( reasons for problems - version incompatibility, broken extension, corrupted file system )&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. Sublime
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;version&lt;/strong&gt; - 3.2.2 (&lt;a href="http://www.sublimetext.com/updates/3/dev/release_notes.html"&gt;Sublime Dev Channel Changelog&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KApBNEJz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/wswugkinune1ry62r6td.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KApBNEJz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/wswugkinune1ry62r6td.png" alt="sublime_best_python_ides_2020" width="800" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Sublime is great text editor which can do much more than that. I'm using it to work it temporary information, interesting articles and texts. For example collecting meeting notes, decisions, to do lists etc.&lt;/p&gt;

&lt;p&gt;I'm using it as a &lt;code&gt;mental&lt;/code&gt; separation and not like a technical one. What I mean here is: if I'm on a meeting then I'll open Sublime in Markdown mode and I'll gather meeting notes there. If interesting idea or solution came on my mind - then I'll write down them with Sublime. Later on the same day I'll go through all files in Sublime and do something with them - for example add them to my &lt;a href="https://blog.softhints.com/complete-guide-to-developing-a-powerful-documenation-lab-diary/"&gt;Lab Diary&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All day long I have open Sublime text editor. I'm using it in minimalistic mode - trying to avoid distraction and do what I need to do in the smallest possible number of clicks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://blog.softhints.com/sublime-4-text-reindent-json-file/"&gt;working with JSON files - reindent&lt;/a&gt; - view, edit and reindent JSON files&lt;/li&gt;
&lt;li&gt;Markdown support - collecting meeting notes and TODO lists&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://blog.softhints.com/sublime-text-3-tricks-compare-files-highlight-and-regex/"&gt;File comparison and regex&lt;/a&gt; - searching with regex, edit and replace in small to medium files

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blog.softhints.com/notepad-regex-find-group-of-words-and-replace/"&gt;Regex find group of words and replace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://blog.softhints.com/notepad-regex-replace-capture-group-examples-list/"&gt;Regex examples of capture group and replace&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Store temporary notes, links and code snippets&lt;/li&gt;
&lt;li&gt;Small python code snippets and bash scripts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Nice/Python packages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://packagecontrol.io/packages/Anaconda"&gt;Anaconda&lt;/a&gt; - Anaconda turns your Sublime Text 3 in a full featured Python development IDE including autocompletion, code linting, IDE features, autopep8 formating, McCabe complexity checker Vagrant and Docker support for Sublime Text 3 using Jedi, PyFlakes, pep8, MyPy, PyLint&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://packagecontrol.io/packages/SublimePythonIDE"&gt;Sublime Python IDE&lt;/a&gt; - add python completions and refactoring&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://packagecontrol.io/packages/Djaneiro"&gt;Djaneiro&lt;/a&gt; - Django snippets and  templates, keyword highlighting &lt;/li&gt;
&lt;li&gt;
&lt;a href="https://packagecontrol.io/packages/MarkdownPreview"&gt;Markdown Preview&lt;/a&gt; - Preview and build your markdown files quickly in your web browser&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cross-platform&lt;/li&gt;
&lt;li&gt;Pretty good package system&lt;/li&gt;
&lt;li&gt;Highly customizable&lt;/li&gt;
&lt;li&gt;Light with good performance&lt;/li&gt;
&lt;li&gt;Syntax Highlighting (&lt;a href="http://blog.softhints.com/sublime-install-new-theme-white-color/"&gt;various color themes&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Block selection and simultaneous editing (multiple selections)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;(Personal experience)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It's not suitable for huge python projects&lt;/li&gt;
&lt;li&gt;It's had to work in multiproject way&lt;/li&gt;
&lt;li&gt;Needs extra time and knowledge to be converted in Python IDE&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  4. Atom
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;version&lt;/strong&gt; - 1.42.0 (&lt;a href="https://atom.io/releases"&gt;Atom Release notes&lt;/a&gt;)&lt;br&gt;
 and &lt;a href="https://github.com/atom/atom/releases"&gt;Atom releases in github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0VeiUnpw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/hms6apigvs9vswa3qlm9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0VeiUnpw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://thepracticaldev.s3.amazonaws.com/i/hms6apigvs9vswa3qlm9.png" alt="atom_best_python_ides_2020" width="800" height="499"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Atom is helping me to collaborate with my colleagues by using plugin - &lt;a href="https://teletype.atom.io/"&gt;Teletype - Collaborate in real time in Atom&lt;/a&gt;. From the official page:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Teletype(beta) for Atom lets developers share their workspace with team members and collaborate on code in real time.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It's quite nice feature for beginners and people who want to learn Python faster.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'm using it 1 or 2 days per week when I need to support colleague of mine or I need help with some tasks. Atom support many different languages so I'm using it not only for Python but also for JSON and YAML files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Small projects for beginners, JSON and YAML schemas, configurations. I like color themes and code styles of Atom for JSON / Markdown files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nice/Python packages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://atom.io/packages/atom-python-run"&gt;atom-python-run&lt;/a&gt; - Execute python (.py) programs using F5 or F6
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://atom.io/packages/python-black"&gt;Python Black&lt;/a&gt; - Uses Black for formatting Python code. It requires - black to be installed - &lt;code&gt;pip install black&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://atom.io/packages/python-indent"&gt;python-indent&lt;/a&gt; Simple and powerful Python PEP8 auto-indentation&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://atom.io/packages/atom-python-test"&gt;atom-python-test&lt;/a&gt; - run py.tests and unitest.TestCase tests&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://atom.io/packages/python-tools"&gt;Python Tools&lt;/a&gt; - handy tools to make developing Python code in Atom even more enjoyable&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://atom.io/packages/autocomplete-python"&gt;Python Autocomplete Package&lt;/a&gt; - Python packages, variables, methods and functions with their arguments autocompletion&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cross-platform&lt;/li&gt;
&lt;li&gt;Package management&lt;/li&gt;
&lt;li&gt;Native git versioning&lt;/li&gt;
&lt;li&gt;Multi-language support with good syntax highlighting&lt;/li&gt;
&lt;li&gt;Lightweight&lt;/li&gt;
&lt;li&gt;Open source and free&lt;/li&gt;
&lt;li&gt;Multiple panes and themes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it has unique way of work which needs some time of learning&lt;/li&gt;
&lt;li&gt;lack of good single tap / project structure way of working. (For example in PyCharm I can work only with 1 open tab at time easily navigating in Project pane and recent files. Which I find hard in Atom)&lt;/li&gt;
&lt;li&gt;needs time for configuration for Python&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Interested in Python IDEs
&lt;/h3&gt;

&lt;h4&gt;
  
  
  5. Visual Studio Code
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;version&lt;/strong&gt; - Visual Studio 2019 (expected Visual Studio 2020)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.microsoft.com/en-us/visualstudio/releases/2019/release-notes"&gt;Visual Studio 2019 Release Notes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some people prefer VS code (Visual Studio Code) because it is very well designed for the development and debugging of latest web and cloud projects. For example some people working with Angular and ReactJS use it in their everyday work.&lt;/p&gt;

&lt;p&gt;Visual Studio Code is another mature framework which have great community. It has nice editor and offers development features which makes work on web projects almost without any efforts. Maybe the only one IDE from the list which can rival in web development with VS Code is PyCharm Professional Edition.&lt;/p&gt;

&lt;p&gt;Features which attract my interest:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;plugins and customization&lt;/li&gt;
&lt;li&gt;nice self-explaining interface and layout&lt;/li&gt;
&lt;li&gt;multi-split window feature&lt;/li&gt;
&lt;li&gt;vertical orientation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Testing Visual Studio Code with new small web projects and see how behaves in comparison to PyCharm. Test project life cycle - starting empty project, installing dependencies and use git integration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Web related projects, angular plus reactjs. It might be good for people who want to learn python and has experience in other languages and Visual Studio code. Appropriate for web development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Nice/Python plugins&lt;/strong&gt;&lt;br&gt;
    * &lt;a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens"&gt;GitLens&lt;/a&gt; - Git blame annotations and code lens&lt;br&gt;
    * &lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-python.python"&gt;Python&lt;/a&gt; - rich support for the Python language&lt;br&gt;
    * &lt;a href="https://code.visualstudio.com/docs/python/linting"&gt;Code Linting&lt;/a&gt; - linting your python code ( Note: Linting is the process of running a program that analyzes your code for programmatic and stylistic errors )&lt;br&gt;
    * &lt;a href="https://marketplace.visualstudio.com/items?itemName=thebarkman.vscode-djaneiro"&gt;Djaneiro&lt;/a&gt; - python and django code snippets&lt;br&gt;
    * &lt;a href="https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring"&gt;autoDocstring&lt;/a&gt; - quickly generate docstrings for python functions&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multi-platform&lt;/li&gt;
&lt;li&gt;free&lt;/li&gt;
&lt;li&gt;open Source.&lt;/li&gt;
&lt;li&gt;multi-language support&lt;/li&gt;
&lt;li&gt;good integration with git&lt;/li&gt;
&lt;li&gt;live precompilation on change - if you do a change on your started web project in most cases will be propagated to the started app ( might depends on the OS settings - like number of file to monitor )&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it needs configuration and setup for python&lt;/li&gt;
&lt;li&gt;it's resource demanding&lt;/li&gt;
&lt;li&gt;searching might be slow ( this might depend on the OS, hardware, project size and configuration)&lt;/li&gt;
&lt;li&gt;worse navigation and indexing in comparison to PyCharm ( it need additional configuration for python )&lt;/li&gt;
&lt;li&gt;slower start (also some operations might take more time than expected)&lt;/li&gt;
&lt;li&gt;Some problems with Linux integration ( I faced problems during installation and configuration for some projects in the past )&lt;/li&gt;
&lt;li&gt;Some developers complain that Change log for git is not good enough and use 3rd party software like GitKraken in combination with Visual Code studio.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  6. Vim
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Version&lt;/strong&gt; Vim 8.1 is the latest stable version.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Vim is extremely popular in geeks communities and people who has unique style of writing code. There is big lists or plugins, features and versions of Vim. &lt;/p&gt;

&lt;p&gt;And one advice from Python's creator - Guido van Rossum&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://twitter.com/gvanrossum/status/854348561223360515?lang=en"&gt;Emacs is dead, use vim.&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;How&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Starting with small projects and tutorial from the web maybe once per month.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Small python and cross-language projects which requires focus and distraction free environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open Source&lt;/li&gt;
&lt;li&gt;Cross-platform&lt;/li&gt;
&lt;li&gt;Simplistic&lt;/li&gt;
&lt;li&gt;Distraction free&lt;/li&gt;
&lt;li&gt;Very stable&lt;/li&gt;
&lt;li&gt;Lightweight&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;it's not good for people who don't like to use terminal&lt;/li&gt;
&lt;li&gt;difficult for beginners because it has stipple learning curve&lt;/li&gt;
&lt;li&gt;It can be challenging even for experience programmers - because it has unique way of working which requires focus and concentration&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  7. Eclipse PyDev
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Version&lt;/strong&gt; - Release 7.4.0 (2019-10-25)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Eclipse was my favorite IDE in the past for many years. I'll give chance to it again and again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Testing existing projects from PyCharm in Eclipse PyDev. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Small and medium python projects to see what is new in Eclipse PyDev. What I want to ensure is that Eclipse PyDev is stable and with good performance for the most of python project life cycle.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Python features&lt;/strong&gt; - this is the full table of &lt;a href="https://www.pydev.org/manual_adv_features.html"&gt;features for PyDev&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Django integration&lt;/li&gt;
&lt;li&gt;Code completion with auto import&lt;/li&gt;
&lt;li&gt;Remote debugger&lt;/li&gt;
&lt;li&gt;Interactive console&lt;/li&gt;
&lt;li&gt;Unittest integration&lt;/li&gt;
&lt;li&gt;Code coverage&lt;/li&gt;
&lt;li&gt;PyLint integration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;open Source and free&lt;/li&gt;
&lt;li&gt;multi-platform source editor&lt;/li&gt;
&lt;li&gt;designed for python&lt;/li&gt;
&lt;li&gt;multi-language support&lt;/li&gt;
&lt;li&gt;interactive console&lt;/li&gt;
&lt;li&gt;unittest integration&lt;/li&gt;
&lt;li&gt;good syntax high lighting&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;very often the plugins are unstable or crashing the IDE. I had huge problems and lost many lines of code because of git problems with Eclipse (which force me to move to IntelliJ few years ago)&lt;/li&gt;
&lt;li&gt;bad performance, unresponsive at times, crashes&lt;/li&gt;
&lt;li&gt;plugins are not working smoothly&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  8. Emacs
&lt;/h4&gt;

&lt;p&gt;latest version is: 26.3&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the past Emacs was the favorite editor for Guido van Rossum(who later - 2017 - said that Emacs is dead - check section for Vim) and many others.&lt;/p&gt;

&lt;p&gt;Tweet from Guido in 2016:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://twitter.com/gvanrossum/status/753963185741246465?lang=en"&gt;Emacs of course!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In Book: The Art of UNIX Programming is said:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Emacs is undoubtedly the most powerful programmer's editor in existence. It's a big, feature-laden program with a great deal of flexibility and customizability.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;How&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I'll give a try to it several times duing 2020.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Small projects and code snippets.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;helps to focus&lt;/li&gt;
&lt;li&gt;during the learning process and configuration for emacs you can learn a lot of your mistakes :)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;installation depends on the platform&lt;/li&gt;
&lt;li&gt;additional package for git integration - magit&lt;/li&gt;
&lt;li&gt;more complex way of debugging&lt;/li&gt;
&lt;li&gt;need additional steps for code formatting, syntax checking etc&lt;/li&gt;
&lt;li&gt;specific customization and configuration for python&lt;/li&gt;
&lt;li&gt;Emacs has a learning curve which require more time in comparison to other source editors.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Python IDEs/Code editors for beginners
&lt;/h3&gt;

&lt;h4&gt;
  
  
  9. IDLE
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's the simplest possible way to run and work with python code on your desktop machine which is included in Python by default.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I need to teach beginner or person without any experience in Python.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Simple projects like web browser game automations, basic web scraping applications and office automation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No need of installation, setup etc. Just code!&lt;/li&gt;
&lt;li&gt;Perfect for verifying small snippets and how python works&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It has some limitation - you can't master python by using only IDLE. Soner or later you will need to try something better&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  10. Online Python editors
&lt;/h4&gt;

&lt;p&gt;&lt;a href="/content/images/2019/10/python_online_editor_2020.png" class="article-body-image-wrapper"&gt;&lt;img src="/content/images/2019/10/python_online_editor_2020.png" alt="python_online_editor_2020"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some companies and organizations prohibit installation of additional software (sometimes you might be able to run portable python from a USB) or even detecting what processes are running. In this cases using web Python code editor is the only available option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Occasional use&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Basic snippets and small programs&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No need of installation, setup etc. Just code!&lt;/li&gt;
&lt;li&gt;Perfect for verifying small snippets and how python works&lt;/li&gt;
&lt;li&gt;Code sharing&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;many limitation - working with files, resources etc&lt;/li&gt;
&lt;li&gt;depends on Internet&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion - What is the best Python IDE in 2020?
&lt;/h2&gt;

&lt;p&gt;For me the question has strange answer: There's no best IDE for Python in 2020 but there is a constellation/combination of IDEs and text editors which can make learning, coding and working with python code faster, easier and more reliable. &lt;/p&gt;

&lt;p&gt;The closer IDE to the first place is PyCharm - because offers the richest set of features and options. Despite being relatively young IDE - Initial release -  February 2010 (about 9 years ago - in comparison to Emacs - with versions since March 20, 1985) - it's well developed and mature environment which can manage big set of projects and assist developer in best possible way.  For me :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;PyCharm is the most pythonic IDE in 2020!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;One advice - Don't search for best/most etc but search for optimal - the tool which can help you do your work with less efforts. &lt;/p&gt;

&lt;p&gt;Happy Coding in 2020,&lt;br&gt;
Softhints.&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>Python 3.8 New Features - code name walrus</title>
      <dc:creator>Softhints</dc:creator>
      <pubDate>Fri, 18 Oct 2019 19:17:51 +0000</pubDate>
      <link>https://dev.to/softhints/python-3-8-new-features-code-name-walrus-1d4n</link>
      <guid>https://dev.to/softhints/python-3-8-new-features-code-name-walrus-1d4n</guid>
      <description>&lt;p&gt;A brief and practical guide to the most important/interesting new features/changes coming with Python 3.8 (code name - walrus - joking :) ). So first lets announce the news:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Python 3.8 was released on October 14th, 2019.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The official documentation is here: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.python.org/3/whatsnew/3.8.html"&gt;What’s New In Python 3.8 - Full documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.python.org/downloads/release/python-380/"&gt;Major new features of the 3.8 series, compared to 3.7 - Short description&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you want to play with the new features without installing the latest python 3.8 then you can do it here: &lt;a href="https://tio.run/#python38pr"&gt;Python 3.8 (pre-release)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://youtu.be/x7Q1GlontuQ"&gt;Brief video showing the new features&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;In this article we are going to have brief, high level review at some of the new features. Python 3.8 comes with a new warlus Operator, positional-only parameters and lots of other new and interesting changes, improvements and features.&lt;/p&gt;

&lt;p&gt;It offers also another &lt;a href="https://docs.python.org/3/whatsnew/3.8.html#new-features"&gt;new features&lt;/a&gt;, plenty of &lt;a href="https://docs.python.org/3/whatsnew/3.8.html#other-language-changes"&gt;language changes&lt;/a&gt;, &lt;a href="https://docs.python.org/3/whatsnew/3.8.html#new-modules"&gt;one new module&lt;/a&gt; and &lt;a href="https://docs.python.org/3/whatsnew/3.8.html#improved-modules"&gt;improvements on others&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Many optimizations and C API changes can be found in the version. Several methods and commands are &lt;a href="https://docs.python.org/3/whatsnew/3.8.html#deprecated"&gt;deprecated&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Personally I'll not move to python 3.8 soon. Nothing is so important or a game changer for the moment. Some features could be tricky or cause confusion which is another reason for me to stick to 3.7 for the moment.&lt;/p&gt;

&lt;h2&gt;
  
  
  New Features
&lt;/h2&gt;

&lt;p&gt;For me the most interesting new features are 3:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Walrus Operator&lt;/li&gt;
&lt;li&gt;Positional-only parameters&lt;/li&gt;
&lt;li&gt;f-strings support =&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The Walrus Operator :=
&lt;/h3&gt;

&lt;p&gt;In short this is a new operator which will be used as assignment or named expression. Official description from the PEP:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is a proposal for creating a way to assign to variables within an expression using the notation NAME := expr.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you wonder why it's called like this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It is affectionately known as "the walrus operator" due to its resemblance to the &lt;a href="https://en.wikipedia.org/wiki/Walrus"&gt;eyes and tusks of a walrus&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The best way to understand the new operator is by viewing some examples like:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Avoid repeated expression calls&lt;/strong&gt;:&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="n"&gt;num&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;num&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"Number is not even: number: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;num&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;, remainder: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;result:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Number is not even: number: 3, remainder: 1      
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Regex expressions&lt;/strong&gt;&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;import&lt;/span&gt; &lt;span class="nn"&gt;re&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;
&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'The latest version of python 3.8 is released on 14-10-2019 .. '&lt;/span&gt;

&lt;span class="c1"&gt;# before walrus
&lt;/span&gt;&lt;span class="n"&gt;whole_match&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;findall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s"&gt;'[\d]{1,2}-[\d]{1,2}-[\d]{4}'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;whole_match&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;whole_match&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# after walrus
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;found_date&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;findall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s"&gt;'[\d]{1,2}-[\d]{1,2}-[\d]{4}'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)):&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;found_date&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;List comprehension&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If a value computed in a filtering condition is also needed in the expression body:&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="n"&gt;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'0'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'6'&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="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'7'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="n"&gt;final_number&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;final_number&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;result:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[3, 6, 2, 1, 7]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Errors and usage&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;Sometimes walrus operator can be misleading and lead to confusion or errors. So it might be a good idea the usage to be limited to simple cases and expressions in order to avoid problems with code readability.&lt;/p&gt;

&lt;p&gt;Below you can find list comprehension and walrus operator which leads to error:&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="n"&gt;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'6'&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="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'7'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;number&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;SyntaxError: assignment expression cannot rebind comprehension iteration variable 'number'&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Another interesting case and possible abuse is:&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="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;he&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;me&lt;/span&gt; &lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="n"&gt;we&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;alltogether&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;I&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;walrus&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can read more here: &lt;a href="https://developers.slashdot.org/comments.pl?sid=14399690&amp;amp;cid=58956560"&gt;I walrus&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Full description is available here: &lt;a href="https://docs.python.org/3/whatsnew/3.8.html"&gt;PEP 572&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Positional-only parameters
&lt;/h3&gt;

&lt;p&gt;New syntax for function parameters is introduced - &lt;code&gt;/&lt;/code&gt;. This is an example function:&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="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in this function parameter &lt;code&gt;a&lt;/code&gt; is positional only and cannot be a keyword argument. While on the other hand &lt;code&gt;c&lt;/code&gt; must be a keyword argument.&lt;/p&gt;

&lt;p&gt;Let's check several examples:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;correct call for this function:&lt;/strong&gt;&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="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;result:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10 20 30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h6&gt;
  
  
  Errors
&lt;/h6&gt;

&lt;p&gt;&lt;strong&gt;TypeError: f() takes 2 positional arguments but 3 were given&lt;/strong&gt;&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="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;# c must be a keyword argument
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;result in&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TypeError: f() takes 2 positional arguments but 3 were given&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;TypeError: f() got some positional-only arguments passed as keyword arguments: 'a'&lt;/strong&gt;&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="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# a cannot be a keyword argument
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;result in&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TypeError: f() got some positional-only arguments passed as keyword arguments: 'a'&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Positional only parameters can be used in two ways. Their names are not shown as possible keywords which makes them available for &lt;strong&gt;kwargs&lt;/strong&gt;:&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="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;kwargs&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;kwargs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;         &lt;span class="c1"&gt;# x is used in two ways
&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s"&gt;'x'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'y'&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more info: &lt;a href="https://www.python.org/dev/peps/pep-0570/"&gt;Python Positional-Only Parameters&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  f-strings support = for self-documenting expressions and debugging
&lt;/h3&gt;

&lt;p&gt;In 3.8 is added support for &lt;code&gt;=&lt;/code&gt; for f-strings. So f-string like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;f'{version=} is released on {release_date=}'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;will be represented as:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;version='3.8' is released on release_date=datetime.date(2019, 10, 14)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Few more examples on this&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;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;

&lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'3.8'&lt;/span&gt;
&lt;span class="n"&gt;release_date&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2019&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;python_one_version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1994&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;since_python_one&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;release_date&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;python_one_version&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; is released on &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;release_date&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; day of Release &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;python_one_version&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;02&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; day of Release &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;since_python_one&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;results:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;version='3.8' is released on release_date=datetime.date(2019, 10, 14)
version='3.8' day of Release python_one_version.day=01
version='3.8' day of Release since_python_one.days=9,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Used in previous python versions like python 3.7 will result in:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  File "&amp;lt;fstring&amp;gt;", line 1
    (version=)
            ^
SyntaxError: invalid syntax
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The main idea is:&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="c1"&gt;#(really) bad old days this was pretty wordy:
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt; &lt;span class="s"&gt;"foo="&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"bar="&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bar&lt;/span&gt;

&lt;span class="c1"&gt;#f-strings make this slightly nicer to type:
&lt;/span&gt;&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;foo&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;bar&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;result:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;foo=datetime.date(2019, 10, 14) bar=1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Other new features
&lt;/h3&gt;

&lt;p&gt;Some of the features cannot be easily explained with examples so I'll just list them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parallel filesystem cache for compiled bytecode files&lt;/li&gt;
&lt;li&gt;Debug build uses the same ABI as release build&lt;/li&gt;
&lt;li&gt;PEP 578: Python Runtime Audit Hooks&lt;/li&gt;
&lt;li&gt;PEP 587: Python Initialization Configuration&lt;/li&gt;
&lt;li&gt;Vectorcall: a fast calling protocol for CPython&lt;/li&gt;
&lt;li&gt;Pickle protocol 5 with out-of-band data buffers&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Other language changes
&lt;/h2&gt;

&lt;p&gt;In this section there are some quite interesting changes which might need your attention when you migrated from older python version to 3.8 like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;continue&lt;/code&gt; statement is now allowed in &lt;code&gt;finally&lt;/code&gt; clause&lt;/li&gt;
&lt;li&gt;new method &lt;a href="https://docs.python.org/3/library/stdtypes.html#int.as_integer_ratio"&gt;as_integer_ratio()&lt;/a&gt; for bool, int and Fraction types:
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;as_integer_ratio&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;result:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(7, 1)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Added support of \N{name} escapes in regular expressions:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;re&lt;/span&gt;

&lt;span class="n"&gt;notice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'Copyright © 2019'&lt;/span&gt;
&lt;span class="n"&gt;copyright_year_pattern&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="s"&gt;'\N{copyright sign}'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;copyright_year_pattern&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;notice&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;which will error in earlier versions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;sre_constants.error: bad escape \N at position 0&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Dict and dictviews are now iterable in reversed insertion order using reversed()&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Warnings when comma is missed in code like &lt;code&gt;[(1, 2) (3, 4)]&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;before:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  File ".code.tio", line 1, in &amp;lt;module&amp;gt;
    [(1, 2) (3, 4)]
TypeError: 'tuple' object is not callable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;now:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SyntaxWarning: 'tuple' object is not callable; perhaps you missed a comma?
  [(1, 2) (3, 4)]
Traceback (most recent call last):
  File ".code.tio", line 1, in &amp;lt;module&amp;gt;
    [(1, 2) (3, 4)]
TypeError: 'tuple' object is not callable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;Arithmetic operations between subclasses of datetime.date or datetime.datetime and datetime.timedelta objects now return an instance of the subclass, rather than the base class.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&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;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timezone&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;DateTimeSubclass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;pass&lt;/span&gt;

&lt;span class="n"&gt;dt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;DateTimeSubclass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2012&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;dt2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;astimezone&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;timezone&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;utc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dt&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dt2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in python 3.8&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;class '__main__.DateTimeSubclass'&amp;gt;
&amp;lt;class '__main__.DateTimeSubclass'&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;before:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;class '__main__.DateTimeSubclass'&amp;gt;
&amp;lt;class 'datetime.datetime'&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When the Python interpreter is interrupted by Ctrl-C (SIGINT) and the resulting KeyboardInterrupt exception is not caught, the Python process now exits via a SIGINT signal&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Dict comprehensions have been synced-up with dict literals so that the key is computed first and the value second:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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;unicodedata&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;normalize&lt;/span&gt;
&lt;span class="n"&gt;names&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;'Löwis'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'Łukasz'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;'Dörwald'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;({(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;normalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'NFC'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="n"&gt;casefold&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;names&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;result:&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{'löwis': 'Löwis', 'łukasz': 'Łukasz', 'dörwald': 'Dörwald'}&lt;br&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Conclusion&lt;br&gt;
&lt;/h2&gt;

&lt;p&gt;Python 3.8 comes with new assignment operator, syntax for function parameters and many other improvements and features. At the first sight some of the changes look a bit controversial but they can offer new solution to old problems.  &lt;/p&gt;

&lt;p&gt;The examples covered in the article show potential for expanding the usage beyond the scope described in PEPs. &lt;/p&gt;

&lt;p&gt;Once this version is well adopted I'll move to it in order to explore the full potential of it.&lt;/p&gt;

&lt;p&gt;Previous python release is reviewed in this article: &lt;a href="https://blog.softhints.com/python-3-7-features-and-release-date/"&gt;Python 3.7 features and release date&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>strings</category>
      <category>function</category>
    </item>
    <item>
      <title>6 Best Practices for Gmail to Boost Your Workflow</title>
      <dc:creator>Softhints</dc:creator>
      <pubDate>Fri, 20 Sep 2019 06:53:53 +0000</pubDate>
      <link>https://dev.to/softhints/6-best-practices-for-gmail-to-boost-your-workflow-4821</link>
      <guid>https://dev.to/softhints/6-best-practices-for-gmail-to-boost-your-workflow-4821</guid>
      <description>&lt;p&gt;According to recent research done in August 2019 Gmail is mail client number one with 29 % market share (more info: &lt;a href="https://emailclientmarketshare.com/" rel="noopener noreferrer"&gt;Email Client Market Share&lt;/a&gt;). On the other hand the modern worker spent about 28 % of their time in email management. (More info here: &lt;a href="https://www.mckinsey.com/industries/high-tech/our-insights/the-social-economy" rel="noopener noreferrer"&gt;The social economy: Unlocking value and productivity through social technologies &lt;/a&gt;). If you spend one third of your time using Gmail, most probably you will need to analyze your workflow.&lt;/p&gt;

&lt;p&gt;This article try to share tips and tricks based on my personal experience. The results of the article can be measured and verified after one month. Some of them are applicable not only for Gmail but also for other clients like Microsoft Outlook, Yahoo, Thunderbird, etc&lt;/p&gt;

&lt;p&gt;You can find the official best practices from Google here: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://support.google.com/a/answer/1409688?hl=en" rel="noopener noreferrer"&gt;Best practices for Gmail accounts&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://support.google.com/a/users/answer/9282734?hl=en" rel="noopener noreferrer"&gt;10 G Suite tips to optimize your inbox&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The best practices:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use labels and categorize Gmail&lt;/li&gt;
&lt;li&gt;Create ToDo, Important and Non important folders&lt;/li&gt;
&lt;li&gt;Open and use your Gmail only at a given time&lt;/li&gt;
&lt;li&gt;Keep your inbox clean and neat&lt;/li&gt;
&lt;li&gt;Use mail templates&lt;/li&gt;
&lt;li&gt;Customize Your Gmail Interface Look With Themes&lt;/li&gt;
&lt;li&gt;Gmail scheduling and automation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fobgr52xtnxn00o7n464y.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fobgr52xtnxn00o7n464y.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Use labels and categorize Gmail
&lt;/h2&gt;

&lt;p&gt;There's no limit on the number of the labels you can create. You can organize the labels similarly to folders on your computer.&lt;/p&gt;

&lt;p&gt;Note: Have in mind that labels don't behave always as folders. For example if you delete a mail then it's going to be removed from all labels!&lt;/p&gt;

&lt;p&gt;In order to create labels in Gmail you can follow this steps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;start Gmail. (note you can't create labels from the Gmail app)&lt;/li&gt;
&lt;li&gt;click &lt;em&gt;More&lt;/em&gt; (on the left)&lt;/li&gt;
&lt;li&gt;Click &lt;em&gt;Create new label&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Select &lt;em&gt;name&lt;/em&gt; for your label.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;Create&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once the label is created it can be deleted or edited by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;start Gmail&lt;/li&gt;
&lt;li&gt;Select label (on the left)&lt;/li&gt;
&lt;li&gt;Click the Down arrow (next to it).&lt;/li&gt;
&lt;li&gt;Click &lt;em&gt;Edit&lt;/em&gt; if you want to edit the label

&lt;ul&gt;
&lt;li&gt;or delete if you like to remove the label&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Create well organized structure having this simple rules in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use optimal number of labels - too much will cause extra level of complexity while too few will be insufficient&lt;/li&gt;
&lt;li&gt;Avoid duplication of labels - labels should be distinctive and unique.&lt;/li&gt;
&lt;li&gt;Put the important labels at the top and less important at the bottom&lt;/li&gt;
&lt;li&gt;create filters which will categorize your mail automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now in order to expand the last section of the rules. Filters helps to organize incoming emails by&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;labeling&lt;/li&gt;
&lt;li&gt;archiving&lt;/li&gt;
&lt;li&gt;deleting&lt;/li&gt;
&lt;li&gt;adding star&lt;/li&gt;
&lt;li&gt;automated forward&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;New filter can be created by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gmail&lt;/li&gt;
&lt;li&gt;In the search box at the top, click the Down arrow Down Arrow.&lt;/li&gt;
&lt;li&gt;Enter your search criteria. You can test the criteria by clicking search and seeing what emails show up.&lt;/li&gt;
&lt;li&gt;click Create filter (at the bottom of the search window).&lt;/li&gt;
&lt;li&gt;Choose action(s) for your filter.&lt;/li&gt;
&lt;li&gt;Click &lt;em&gt;Create filter&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Create ToDo, Important and Non important folders
&lt;/h2&gt;

&lt;p&gt;Add labels and filters which can help you to preorganize the incoming mails automatically. This is going to work fine in most cases but not in all. I have simple rules for dealing with new mails(Once the initial labeling is completed - which will help me to understand better from who is the mail):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;read the email subject&lt;/li&gt;
&lt;li&gt;check quickly the content&lt;/li&gt;
&lt;li&gt;Now there are 3 actions which I can do:

&lt;ul&gt;
&lt;li&gt;move the mail in folder ToDo&lt;/li&gt;
&lt;li&gt;read the mail (if there's no need of action or I can perform the action)&lt;/li&gt;
&lt;li&gt;leave the mail untouched&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This rule can be tested best after absense or holidays when there are hundreds of mails in your mailbox. If your folder is well organized (keeping the top-bottom rule - most important mails on the top - then you can review hundreds of mails in matters of one or two hours).&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Open and use your Gmail only at a given time
&lt;/h2&gt;

&lt;p&gt;One common mistake is to keep your email client (and Gmail in particular) opened all the time and getting notified for every incoming mail. This will lead to distraction and switching between the tasks. In order to avoid this you can schedule a script or open your mail client two, three times per day. My personal preference is to start the gmail at 10 and 17.&lt;/p&gt;

&lt;p&gt;Usually I start my working day at 8 in the morning. I want to complete the tasks from the previous day or to continue with my ToDo list. If I start the mail client first I'll lose track on my ToDo list or might have change in priorities.&lt;/p&gt;

&lt;p&gt;Next time to open the mail is near the end of the working day(1-3 hours before it). This will give me enough time to do something if needed and also organize the next day better.&lt;/p&gt;

&lt;p&gt;The good bosses don't expect you to be answering all the time or to be on stand by mode - waiting for their instructions. The good bosses check results and not how long you are available. On the other hand if someone expect your response 100% of the time (while this is not job requirement) you may think for a change.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Keep your inbox clean and neat
&lt;/h2&gt;

&lt;p&gt;Why to tidy up your inbox? There are many reasons for this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;easier to find a mail&lt;/li&gt;
&lt;li&gt;less time and efforts to deal with new mails&lt;/li&gt;
&lt;li&gt;save you few extra clicks and mistakes from manual management&lt;/li&gt;
&lt;li&gt;keep sensitive mails in a label and not in your inbox (sometimes you may need to share your inbox and you don't want someone else to see your sensitive information)&lt;/li&gt;
&lt;li&gt;spent more time on important mails and less on spam(once something is identified as high/low informative and recurring mail - be sure to create filter for it!)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most of the time my inbox is empty. This is because all other mails are automatically labeled and moved to different folders. In this way the inbox contains only "strange" or not categorized mails. If I find any kind of mail important - then I'll add new label and filter in order to deal with this kind of messages automatically.&lt;/p&gt;

&lt;p&gt;Bad practice here is to have thousands of unread mails in your inbox. This will take extra time for searching and reading mails. Most of the time even you won't be able to find the message you need. &lt;/p&gt;

&lt;p&gt;On the other hand if you work on several projects/people and they have labels - then you can search for the mail only in a given label.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Use mail templates
&lt;/h2&gt;

&lt;p&gt;Many things will be repeated in your working days like- birthdays, anniversaries, new comers, reports, technical requests etc. All this kind of mails can be created from templates.&lt;/p&gt;

&lt;p&gt;Of course you can do it by searching the mail and copy pasting it each time. But this is simply no efficient way of working. If you want to be more efficient then you can create templates. In order to create Gmail mail templates follow this steps:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First you need to enable the template feature&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open Gmail&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Settings&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Settings&lt;/strong&gt; from the menu&lt;/li&gt;
&lt;li&gt;Select tab &lt;strong&gt;Advanced&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Enable &lt;strong&gt;Canned Responses (Templates)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Save the Changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now you can create and use new message templates&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create new email template or edit existing&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gmail&lt;/li&gt;
&lt;li&gt;click Compose&lt;/li&gt;
&lt;li&gt;Enter your template text&lt;/li&gt;
&lt;li&gt;Click More&lt;/li&gt;
&lt;li&gt;Canned responses&lt;/li&gt;
&lt;li&gt;Choose an option - create or edit:

&lt;ul&gt;
&lt;li&gt;Save draft as template &amp;gt; Save as new template - create new template&lt;/li&gt;
&lt;li&gt;click &lt;strong&gt;Save draft as template&lt;/strong&gt; and &lt;strong&gt;under Overwrite Template&lt;/strong&gt;, choose a response and click &lt;strong&gt;Save&lt;/strong&gt; to overwrite it&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Gmail use templates&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gmail&lt;/li&gt;
&lt;li&gt;click Compose.&lt;/li&gt;
&lt;li&gt;Click More&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Canned responses&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Insert Template&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Choose a saved response to insert in your email.&lt;/li&gt;
&lt;li&gt;Compose the rest of your message&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Send&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: To delete a canned response, click &lt;strong&gt;Delete template&lt;/strong&gt;, choose the response you want to delete, and click &lt;strong&gt;Delete&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automate Gmail templates&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gmail&lt;/li&gt;
&lt;li&gt;In the search box at the top&lt;/li&gt;
&lt;li&gt;Click the Down arrow&lt;/li&gt;
&lt;li&gt;Click Create filter - At the bottom of the search window&lt;/li&gt;
&lt;li&gt;Choose what you’d like the filter to do

&lt;ul&gt;
&lt;li&gt;Enter your search criteria (for example mail summary - birthday)&lt;/li&gt;
&lt;li&gt;or From - the sender of the mail&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Click &lt;strong&gt;Create filter&lt;/strong&gt;.&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F3ps9hb1st9sizgycpkd1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F3ps9hb1st9sizgycpkd1.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Customize Your Gmail Interface Look With Themes
&lt;/h2&gt;

&lt;p&gt;Spending most of the time with Gmail you might want to change the default layout and look. According to some researches if you watch inspiring images you will be more creative and productive. Also good images can bring better mood which might be essential if your day is passing in front of the monitor.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a color can change our mood from sad to happy, from confusion to intelligence, from fear to confidence. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you want to read more about it then you can check here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://journals.sagepub.com/doi/full/10.1177/2158244014525423" rel="noopener noreferrer"&gt;The Effects of Color on the Moods of College Students&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Apply a Gmail Theme&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gmail&lt;/li&gt;
&lt;li&gt;Settings&lt;/li&gt;
&lt;li&gt;Themes&lt;/li&gt;
&lt;li&gt;Select a theme from the &lt;strong&gt;Themes screen&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Save&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When selecting images think for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;contrast - you want to read mails easily&lt;/li&gt;
&lt;li&gt;distraction - some images might steal your focus&lt;/li&gt;
&lt;li&gt;changes - frequent changes can bring a note of freshness in your day&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally if you have time and the mood for it go and create your own theme.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Gmail scheduling and automation
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scheduling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Whether the mail will be received, open, read and digested depends on the recipient. But you still can influence on this by targeting optimal time for the person. &lt;/p&gt;

&lt;p&gt;Check the person's time zone and working hours if possible. Then send the mail in the early working hours for him. If you are not sure about the time constraints of the person than you can check for mails from him (if any).&lt;/p&gt;

&lt;p&gt;In order to do email scheduling with Gmail you can do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;create the mail&lt;/li&gt;
&lt;li&gt;then click the down arrow next to &lt;strong&gt;Send&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Schedule Send&lt;/li&gt;
&lt;li&gt;Pick date &amp;amp; time&lt;/li&gt;
&lt;li&gt;Finally click &lt;strong&gt;Schedule Send&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Automation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Much is said and done about automation. In terms of emailing it's a huge opportunity and a problem. My advice for you is to schedule anything which is possible.&lt;/p&gt;

&lt;p&gt;For example if you need to forward mails from a given person to another one or reports (containing given keyword in the summary) then go and create gmail filter.&lt;/p&gt;

&lt;p&gt;If you need to send weekly report to someone - then again create a script which can generate automatical report for you. The web is full with example scripts. For example for python you can use something like:&lt;br&gt;
&lt;a href="https://gist.github.com/yzhong52/d703ec82aeee24164f0c" rel="noopener noreferrer"&gt;send_an_email.py&lt;/a&gt; or others like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/alykoshin/gmail-send#toc1" rel="noopener noreferrer"&gt;Minimalistic module to send emails using GMail&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every journey starts with a single step. You can try several from the tips above and check if they are working for you. Best will be to give time for the changes. &lt;/p&gt;

&lt;p&gt;Let say that you want to test practice number 2. Then prepare for the change ( small analysis of your mail might help in order to find optimal labels for you), apply  the changes and verify the results in 1 month.&lt;/p&gt;

&lt;p&gt;It's important at the beginning and the end to measure the time spent in Gmail (reading, writing, editing and searching mails) - the final goal is to reduce time spent by 50% and more.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>management</category>
      <category>practices</category>
      <category>career</category>
    </item>
    <item>
      <title>Job automation in Linux Mint for beginners 2019</title>
      <dc:creator>Softhints</dc:creator>
      <pubDate>Thu, 05 Sep 2019 14:21:49 +0000</pubDate>
      <link>https://dev.to/softhints/job-automation-in-linux-mint-for-beginners-2019-287e</link>
      <guid>https://dev.to/softhints/job-automation-in-linux-mint-for-beginners-2019-287e</guid>
      <description>&lt;p&gt;Automation helps with boring and tedious work, save time and energy(Of course if you doing it right). Automation and task scheduling in Linux is done with daemon called crontab (CRON for short). The definition below best describes the tool:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;cron is a Unix utility that allows tasks to be automatically run in the background at regular intervals by the cron daemon. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this post you can find several examples of cron and bash scripts in order to automate some tasks like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Crontab for beginners&lt;/li&gt;
&lt;li&gt;
Start random song from your Linux machine &lt;/li&gt;
&lt;li&gt;
Start motivation/relaxation video at given hour &lt;/li&gt;
&lt;li&gt;
Open random text file at Linux Mint start &lt;/li&gt;
&lt;li&gt;
Scrape webdata and load the LibreOffice ( or csv, excel etc) &lt;/li&gt;
&lt;li&gt;
Generate simple report as doc file, create jupyter notebook and send mail &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All examples are written and tested on Linux Mint 19 Cinnamon. I plan additional articles and videos for some of the topics above.&lt;/p&gt;

&lt;p&gt;More articles on automation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.softhints.com/automate-tasks-in-windows-and-linux/" rel="noopener noreferrer"&gt;Automate tasks in Windows and Linux&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://blog.softhints.com/start-stop-application-terminal-linux-mint/" rel="noopener noreferrer"&gt;Start and stop application from terminal in Linux Mint 19 / Ubuntu 18.04&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Crontab for beginners
&lt;/h2&gt;

&lt;p&gt;In order to schedule jobs for your user you need to write:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;crontab &lt;span class="nt"&gt;-e&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;description of this command is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Edit crontab file, or create one if it doesn’t already exist&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now you can list the scheduled jobs in Linux Mint / Ubuntu by:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;crontab &lt;span class="nt"&gt;-l&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;crontab list of cronjobs , display crontab file contents.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Example cron job:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;0 16 &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="nv"&gt;DISPLAY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;:0 thunderbird %u
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this will open Thunderbird mail client at 16:00. Where:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;minute&lt;/th&gt;
&lt;th&gt;hour&lt;/th&gt;
&lt;th&gt;day&lt;/th&gt;
&lt;th&gt;month&lt;/th&gt;
&lt;th&gt;day (week)&lt;/th&gt;
&lt;th&gt;command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;td&gt;DISPLAY=:0 thunderbird %u&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;55&lt;/td&gt;
&lt;td&gt;9-15&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;td&gt;*&lt;/td&gt;
&lt;td&gt;DISPLAY=:0 ~/motivation.sh&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;span id="music"&gt; &lt;/span&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Start random song from your machine
&lt;/h2&gt;

&lt;p&gt;In order to be productive and keep your health you need to do regular breaks. Working on a computer make this habit difficult and you can easily lose impression for time. In order to have regular breaks and get some motivation a simple script can be used to play music at every hour.&lt;/p&gt;

&lt;p&gt;Below you can find the simple script which selects random song from a folder, then start a player with the song and finally close the player.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="nv"&gt;MUSIC&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/mnt/x/Music/Motivation/
&lt;span class="nb"&gt;cd&lt;/span&gt; &lt;span class="nv"&gt;$MUSIC&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; |sort &lt;span class="nt"&gt;-R&lt;/span&gt; |tail &lt;span class="nt"&gt;-1&lt;/span&gt; |while &lt;span class="nb"&gt;read &lt;/span&gt;file&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$MUSIC$file&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    rhythmbox &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$MUSIC$file&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &amp;amp; &lt;span class="nb"&gt;sleep &lt;/span&gt;5m
&lt;span class="k"&gt;done
&lt;/span&gt;killall rhythmbox
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Short explanation of this script:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;#!/bin/bash&lt;/code&gt; - this is a convention so the Unix shell knows what kind of interpreter to run&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MUSIC=/mnt/x/Music/Motivation/&lt;/code&gt; - next is the folder which contains the songs from which a random one will be chosen. Define a variable with the folder and change the current folder to it&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ls |sort -R |tail -1 |while read file; do&lt;/code&gt; - select a random song and assign it to variable file which will be used in next statement&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;rhythmbox "$MUSIC$file" &amp;amp; sleep 5m&lt;/code&gt; - start the music player with the selected song and keep the script for 5 minutes. The maximum length of song in this folder&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;killall rhythmbox&lt;/code&gt; - finally kill the music player&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you have the script(for example name it &lt;strong&gt;motivation.sh&lt;/strong&gt;, place it in your home and allow it's execution)  you can easily schedule new cron job to run by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;open new terminal with CTRL + ALT +T
&lt;/li&gt;
&lt;li&gt;type:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;crontab &lt;span class="nt"&gt;-e&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;add at the end of the file:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 9-17 * * * DISPLAY=:0 /home/user/cron/motivation.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you want the songs to be played every hour between 9 to 17. Happy listening!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backed by science:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In 2005, research from the journal of Psychology of Music showed that software developers experienced more positive moods, better quality of work and improved efficiency when listening to music.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://medium.com/the-mission/the-science-backed-ways-music-affects-your-brain-and-productivity-e11145079305" rel="noopener noreferrer"&gt;The Science Backed Ways Music Affects Your Brain and Productivity&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fos7uf1q9w2gjv0799qow.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fos7uf1q9w2gjv0799qow.jpg" alt="Guitar"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;span id="video"&gt; &lt;/span&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Start motivation/relaxation video at given hour
&lt;/h2&gt;

&lt;p&gt;Next example will demonstrate how to get pause for relax at your work with few lines of code and crontab daemon. This example helps me to schedule a meditation video and relax for 10 minutes several times per day. Basically you can use any video that you like or song- all depends on your personal preferences.&lt;/p&gt;

&lt;p&gt;Usually I'm using meditation music or yoga videos shared by friends. If you don't have anything good in mind then you can download any video from Youtube and use it(just search for relaxing music or chill out).&lt;/p&gt;

&lt;p&gt;The script is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
vlc &lt;span class="nt"&gt;-f&lt;/span&gt; /home/user/Videos/Relaxing.mp4 &amp;amp; &lt;span class="nb"&gt;sleep &lt;/span&gt;10m
killall vlc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;save the script as &lt;strong&gt;motivation.sh&lt;/strong&gt; in folder &lt;code&gt;/home/user/cron/motivation.sh&lt;/code&gt; - or as you prefer&lt;/li&gt;
&lt;li&gt;Start linux terminal&lt;/li&gt;
&lt;li&gt;type:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;crontab &lt;span class="nt"&gt;-e&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;add at the end of the file:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0 10 * * * DISPLAY=:0 /home/user/cron/motivation.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will start VLC player with selected video at 10 in the morning. Will keep it running for 10 minutes and finally kill the player. So I get my break at 10:00 every working day.&lt;/p&gt;

&lt;h4&gt;
  
  
  How to download youtube video in Ubuntu / Linux Mint:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;install youtube-dl by
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;youtube-dl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;download video by:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;youtube-dl https://www.youtube.com/watch?v&lt;span class="o"&gt;=&lt;/span&gt;mkKDI6y2kyE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Bonus: For homework you can try to find out how to download multiple videos and update the script in order to play random one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcvt58hwffr1ogyq3dait.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcvt58hwffr1ogyq3dait.jpg" alt="Meditation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;span id="text"&gt; &lt;/span&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backed by science:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;regular breaks helps with:

&lt;ul&gt;
&lt;li&gt;Increased productivity&lt;/li&gt;
&lt;li&gt;Improved mental well-being&lt;/li&gt;
&lt;li&gt;Creativity boost&lt;/li&gt;
&lt;li&gt;More time for healthy habits&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Source: &lt;a href="https://www.forbes.com/sites/alankohll/2018/05/29/new-study-shows-correlation-between-employee-engagement-and-the-long-lost-lunch-break/#3cd5c88d4efc" rel="noopener noreferrer"&gt;New Study Shows Correlation Between Employee Engagement And The Long-Lost Lunch Break&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Open random text file at Linux Mint start
&lt;/h2&gt;

&lt;p&gt;This is example demonstrates how to automate task at the start of your computer. For me it's very easy to like an article or saying but even easier to forgot about it. So I have a script which loads random piece of text at the start of the machine. In this way I can keep few good reads from a book, article or my to do list :)&lt;/p&gt;

&lt;p&gt;Below you can find the script for the automation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /home/user/Documents/Books/Motivation
&lt;span class="nb"&gt;ls&lt;/span&gt; |sort &lt;span class="nt"&gt;-R&lt;/span&gt; |tail &lt;span class="nt"&gt;-1&lt;/span&gt; |while &lt;span class="nb"&gt;read &lt;/span&gt;file&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    &lt;/span&gt;xed &lt;span class="nv"&gt;$file&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;

: &lt;span class="s1"&gt;'
This script open random text file
'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This script show similar technique as the first example. There are two new things in it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;xed&lt;/code&gt; - using a xed text editor in order to open the text file&lt;/li&gt;
&lt;li&gt;demonstrating how to use bash comments in order to get meaningful information for your scripts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Finally in order to schedule it for the start of your Machine you can do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;terminal&lt;/li&gt;
&lt;li&gt;type:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;code&gt;crontab -e&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and then:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;@reboot /home/user/cron/openRandomText.sh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Or you can use the system start applications like (for Linux Mint):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Main Menu&lt;/li&gt;
&lt;li&gt;Preferences&lt;/li&gt;
&lt;li&gt;Startup Applications&lt;/li&gt;
&lt;li&gt;Add ( the plus button)&lt;/li&gt;
&lt;li&gt;Custom command and type:

&lt;ul&gt;
&lt;li&gt;Name&lt;/li&gt;
&lt;li&gt;Command&lt;/li&gt;
&lt;li&gt;Startup Delay&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;Now you will have all important notes before starting your working day (or any other day).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backed by Science:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We remember things because they either stand out, they relate to and can easily be integrated in our existing knowledge base, or it’s something we retrieve, recount or use repeatedly over time&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Source: &lt;a href="https://www.nbcnews.com/better/health/how-get-better-remembering-things-according-neuroscience-ncna882426" rel="noopener noreferrer"&gt;How to improve your memory, according to neuroscience&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;span id="scraping"&gt; &lt;/span&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Scrape webdata and load the LibreOffice ( or csv, excel etc)
&lt;/h2&gt;

&lt;p&gt;Web data is very important and precious nowadays. Collection is done fast, reliably and in automated manner with special programs - called spiders or scrapers. To write a personal spider is very easy by using modules like scrapy. I'm using spiders when I need to buy something and regularly checking the prices of the targeted product - in this way I can get really good promotion. &lt;/p&gt;

&lt;p&gt;Below you can find very simple spider crawling website and collecting data:&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;import&lt;/span&gt; &lt;span class="n"&gt;scrapy&lt;/span&gt;


&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;QuotesSpider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;scrapy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Spider&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;quotes&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;start_requests&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;urls&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;http://quotes.toscrape.com/page/1/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;http://quotes.toscrape.com/page/2/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;urls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="n"&gt;scrapy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;callback&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="o"&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;filename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;quotes-%s.html&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;
        &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;wb&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Saved file %s&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can find more info at: &lt;a href="https://docs.scrapy.org/en/latest/intro/tutorial.html" rel="noopener noreferrer"&gt;Scrapy Tutorial&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;once your spider is complete you can create script which to automate its execution. Below you can find an example script:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; /home/user/environments/venv36
&lt;span class="nb"&gt;source&lt;/span&gt; ./bin/activate
&lt;span class="nb"&gt;cd&lt;/span&gt; /home/user/PycharmProjects/python/src/spiders/

&lt;span class="nv"&gt;now&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;date&lt;/span&gt; +&lt;span class="s2"&gt;"_%Y-%m-%d"&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;

scrapy runspider my_spider.py &lt;span class="nt"&gt;-o&lt;/span&gt; - &lt;span class="o"&gt;&amp;gt;&lt;/span&gt;data/my_spider/my_spider&lt;span class="nv"&gt;$now&lt;/span&gt;.csv &lt;span class="nt"&gt;-t&lt;/span&gt; csv
python helpers/pandas_after.py

libreoffice &lt;span class="nt"&gt;--calc&lt;/span&gt; /home/user/data/my_spider&lt;span class="nv"&gt;$now&lt;/span&gt;.csv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now lets talk a bit about the code above:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;first two lines are used to activate special python environment for this spider&lt;/li&gt;
&lt;li&gt;then working folder is changed to the spider project&lt;/li&gt;
&lt;li&gt;the line below run the spider and save the output as csv file

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;scrapy runspider my_spider.py -o - &amp;gt;data/my_spider/my_spider$now.csv -t csv&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;command &lt;code&gt;python helpers/pandas_after.py&lt;/code&gt; - call pandas function which clean, add new columns and sort data&lt;/li&gt;

&lt;li&gt;the final line open the newly created CSV file in Libre Office&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This script is scheduled on my machine with the following crontab:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;55 9 &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="k"&gt;*&lt;/span&gt; &lt;span class="nv"&gt;DISPLAY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;:0 /home/user/cron/spider_script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;P.S.&lt;/strong&gt; If you delete (incidentally by crontab -r) your crontab jobs they can be restored (if they were running) by checking the logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s1"&gt;'CRON.*username'&lt;/span&gt; /var/log/syslog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where username is your user name.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcvt58hwffr1ogyq3dait.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fcvt58hwffr1ogyq3dait.jpg" alt="Adult"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;span id="report"&gt; &lt;/span&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Generate simple report as doc file, create jupyter notebook and send mail
&lt;/h2&gt;

&lt;p&gt;The final example shows a small python program which collect data from various sources like Github. The program below will collect Github information about given account:&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="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Github&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;getStars&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;repo&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Softhints&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;get_repos&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;stars&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;stargazers_count&lt;/span&gt;
            &lt;span class="n"&gt;forks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;forks_count&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;stars&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;forks&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_topics&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;

            &lt;span class="n"&gt;open_issues&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;repo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_issues&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;open&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;issue&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;open_issues&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;issue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;stars&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;forks&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I have similar small classes for different API-s and sites like Youtube, Facebook, twitter etc. They collect information which is interesting for me on weekly basis.&lt;/p&gt;

&lt;p&gt;Another really useful tool is Selenium who can help with web automation. Below you can find basic automation for Google search:&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="n"&gt;selenium&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;webdriver&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;selenium.webdriver.chrome.options&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Options&lt;/span&gt;

&lt;span class="c1"&gt;# options.add_argument('--headless') 
&lt;/span&gt;
&lt;span class="n"&gt;executable_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/home/userchromedriver_linux64/chromedriver&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;

&lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Options&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;driver&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;webdriver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Chrome&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;    &lt;span class="n"&gt;executable_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;executable_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;    &lt;span class="n"&gt;chrome_options&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://google.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;search&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_element_by_name&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;q&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;search&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;softhints python automation&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;page_source&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;quit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For this code you need to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;get latest chrome driver from: &lt;a href="https://chromedriver.chromium.org/downloads" rel="noopener noreferrer"&gt;ChromeDriver - WebDriver for Chrome&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;update the script with the latest path&lt;/li&gt;
&lt;li&gt;find the element on the web page

&lt;ul&gt;
&lt;li&gt;on this step you can use really good browser extension - &lt;a href="https://www.katalon.com/" rel="noopener noreferrer"&gt;Katalon - Simplify API, Web, Mobile
Automation Tests&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;sent information for the search&lt;/li&gt;

&lt;li&gt;get the page source&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;The final data is collected into csv file stored on the computer, loaded into Jupyter Notebook and finally small report is sent to me. If I find the report interesting I can go into the notebook for more details.&lt;/p&gt;

&lt;p&gt;The sample code for the script is shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; /home/user/environments/venv36
&lt;span class="nb"&gt;source&lt;/span&gt; ./bin/activate
&lt;span class="nb"&gt;cd&lt;/span&gt; /home/user/PycharmProjects/automation/src/

python weekly.py
python create_report.py
python create_notebook.py
python send mail.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Different sections of the example code can be found below:&lt;/p&gt;

&lt;h4&gt;
  
  
  Python how to create doc files
&lt;/h4&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="n"&gt;docx&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Document&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;docx.shared&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Inches&lt;/span&gt;

&lt;span class="n"&gt;document&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Document&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_heading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Document Title&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_paragraph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;A plain paragraph having some &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;bold&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;bold&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;

&lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_heading&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Heading, level 1&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;level&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_paragraph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Intense quote&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Intense Quote&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_paragraph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;first item in unordered list&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;List Bullet&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_paragraph&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;first item in ordered list&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;List Number&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;demo.docx&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;more info here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://python-docx.readthedocs.io/en/latest/" rel="noopener noreferrer"&gt; Python library for creating and updating Microsoft Word (.docx) files.&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Python how to create jupyter notebook
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;nbformat&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;nbf&lt;/span&gt;

&lt;span class="n"&gt;nb&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nbf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;v4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new_notebook&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="se"&gt;\
&lt;/span&gt;&lt;span class="s"&gt;# Weekly report
Report for github, youtube, etc.&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

&lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="se"&gt;\
&lt;/span&gt;&lt;span class="s"&gt;# Import pandas 
import pandas as pd 

# reading csv file  
pd.read_csv(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;report.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;) &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

&lt;span class="n"&gt;nb&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;cells&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;nbf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;v4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new_markdown_cell&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
               &lt;span class="n"&gt;nbf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;v4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;new_code_cell&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;span class="n"&gt;fname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;report.ipynb&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;w&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;nbf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;write&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nb&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notebook can be created in several different ways. I have two methods the first one (the one above use nbformat) the second one use json templates and create notebooks using the ipython API.&lt;/p&gt;

&lt;h4&gt;
  
  
  Python how to send emails
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Import smtplib for the actual sending function
&lt;/span&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;smtplib&lt;/span&gt;

&lt;span class="c1"&gt;# Import the email modules we'll need
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;email.message&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;EmailMessage&lt;/span&gt;

&lt;span class="c1"&gt;# Open the plain text file whose name is in textfile for reading.
&lt;/span&gt;&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;textfile&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;fp&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Create a text/plain message
&lt;/span&gt;    &lt;span class="n"&gt;msg&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;EmailMessage&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set_content&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;fp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;

&lt;span class="c1"&gt;# me == the sender's email address
# you == the recipient's email address
&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Subject&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;The contents of %s&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;textfile&lt;/span&gt;
&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;From&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;me&lt;/span&gt;
&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;To&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt;

&lt;span class="c1"&gt;# Send the message via our own SMTP server.
&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;smtplib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;SMTP&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;localhost&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_message&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;msg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;quit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;more info here: &lt;a href="https://docs.python.org/3/library/email.examples.html" rel="noopener noreferrer"&gt;Python email: Examples&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt; Automation can be your best friend or your nightmare - all depends on you. Automation may increase dependency and complexity in general but it can save time and energy. &lt;/p&gt;

&lt;p&gt;My personal goal is to automate anything which can be automated and it's going to be repetitive in time. Invest 1 day today and save 1 month in future. This rule helped me to do more work for less time. Of course there is a risk of being late with a given task but later this investment will pay off.&lt;/p&gt;

</description>
      <category>python</category>
      <category>linux</category>
      <category>automation</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
