<?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>Forem: Patryk Gronkiewicz</title>
    <description>The latest articles on Forem by Patryk Gronkiewicz (@pgronkievitz).</description>
    <link>https://forem.com/pgronkievitz</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%2F425176%2Fb142a64c-e007-4861-b722-1aeabe945da7.jpg</url>
      <title>Forem: Patryk Gronkiewicz</title>
      <link>https://forem.com/pgronkievitz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/pgronkievitz"/>
    <language>en</language>
    <item>
      <title>Keyoxide proof</title>
      <dc:creator>Patryk Gronkiewicz</dc:creator>
      <pubDate>Mon, 25 Apr 2022 17:06:06 +0000</pubDate>
      <link>https://forem.com/pgronkievitz/keyoxide-proof-1ih3</link>
      <guid>https://forem.com/pgronkievitz/keyoxide-proof-1ih3</guid>
      <description>&lt;p&gt;This is an OpenPGP proof that connects &lt;a href="https://keyoxide.org/29E8005AD590BF4064785C49AFE7E2FEE443F184" rel="noopener noreferrer"&gt;my OpenPGP key&lt;/a&gt; to &lt;a href="https://github.com/pgronkievitz" rel="noopener noreferrer"&gt;this Github account&lt;/a&gt;. For details check out &lt;a href="https://docs.keyoxide.org/advanced/openpgp-proofs/" rel="noopener noreferrer"&gt;https://docs.keyoxide.org/advanced/openpgp-proofs/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[Verifying my OpenPGP key: openpgp4fpr:29E8005AD590BF4064785C49AFE7E2FEE443F184]&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Toughs On Emacs After a Year of Pandemic</title>
      <dc:creator>Patryk Gronkiewicz</dc:creator>
      <pubDate>Tue, 06 Jul 2021 15:01:28 +0000</pubDate>
      <link>https://forem.com/pgronkievitz/toughs-on-emacs-after-a-year-of-pandemic-2hme</link>
      <guid>https://forem.com/pgronkievitz/toughs-on-emacs-after-a-year-of-pandemic-2hme</guid>
      <description>&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; Configuration
&lt;/li&gt;
&lt;li&gt; TRAMP
&lt;/li&gt;
&lt;li&gt; elisp
&lt;/li&gt;
&lt;li&gt; &lt;code&gt;org-mode&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt; Conclusions
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hello there! First of all - this isn’t any form of review. I was using emacs just from time to time, so I won’t call it whole year of using it. Nonetheless I’ve got a lot more understanding to stuff behind it and I appreciate its extensibility even more than last year.&lt;/p&gt;

&lt;p&gt;&lt;a id="orgee26739"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;

&lt;p&gt;I’m still using Doom Emacs - I still don’t feel good enough at it and at elisp to create config from scratch, but there are some modifications, because I’ve started to use org-mode more extensibly, especially when it comes to writing configuraion. It just makes sense to have my configs next to the documentation. I’ve also switched my Linux distribution from Pop!_OS to NixOS - it feels so much better now. My &lt;code&gt;home-manager&lt;/code&gt; config is now stored next to my emacs config, all in the same place (but I don’t have git repository for it yet).&lt;/p&gt;

&lt;p&gt;&lt;a id="org92841df"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TRAMP
&lt;/h2&gt;

&lt;p&gt;I also started to edit more files on my servers lately due to more self-hosted solutions. I love how TRAMP makes it easy to just edit remote file.&lt;/p&gt;

&lt;p&gt;&lt;a id="org9a22707"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  elisp
&lt;/h2&gt;

&lt;p&gt;It’s a great tool! Thanks to it I’m publishing this blog with almost no effort - just commit and push - other things just happen on it’s own. I’m using script by @to1ne and I’m just loving it. His theme is base of mine with just minor tweaks such as color scheme changes (nord 💙). My &lt;a href="https://gronkiewi.cz" rel="noopener noreferrer"&gt;portfolio webiste&lt;/a&gt; is also published with orgmode, but without such automation since it’s just &lt;code&gt;&amp;lt;SPC&amp;gt;mehh&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a id="orged3bbd0"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;org-mode&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;I’ve said a bit about org-mode in the previous sections, but it just &lt;em&gt;should&lt;/em&gt; have one on it’s own. I’ve started to use tangling a lot, write docs and my notes. It’s great tool for writing and managing tasks since I can throw ’em around and just open org-agenda with filter or so.&lt;/p&gt;

&lt;p&gt;&lt;a id="org70bc369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;Emacs is even better tool than I tought at first. It just lacks good code editor, but since there’s eVIl-mode - I’m satisfied more than enough.&lt;/p&gt;

</description>
      <category>emacs</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Why suckless software sucks?</title>
      <dc:creator>Patryk Gronkiewicz</dc:creator>
      <pubDate>Tue, 18 Aug 2020 22:00:00 +0000</pubDate>
      <link>https://forem.com/pgronkievitz/why-suckless-software-sucks-4hn6</link>
      <guid>https://forem.com/pgronkievitz/why-suckless-software-sucks-4hn6</guid>
      <description>&lt;p&gt;First of all - I was using suckless tools for a long time and I know &lt;em&gt;almost&lt;/em&gt; every of their down- and upsides. Let’s start with some positive opinions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why suckless is worthy its name?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;It’s LIGHTWEIGHT&lt;/strong&gt;. It’s the most important information about it. That’s just well-written bunch of code with little/none customizability out of the box. But that’s sometimes &lt;em&gt;very&lt;/em&gt; nice! Consider this situation:&lt;/p&gt;

&lt;p&gt;You’re environmentalist who doesn’t want to change their hardware every 2/3/5/10 or even more years. Linux is quite lightweight most of the time on its own, but over 10 years with the same CPU, probably 2 gigs of RAM, old GPU/iGPU could be not enough, even for linux with some DE. Well, then your choice (in my opinion of course) &lt;em&gt;should&lt;/em&gt; be suckless software. It’s easy on CPU, blazing fast (even on potato).&lt;/p&gt;

&lt;p&gt;Configuration isn’t that easy because of patches, but basic stuff is just OK.&lt;/p&gt;

&lt;h2&gt;
  
  
  When and why suckless _ &lt;strong&gt;SHOULDN’T&lt;/strong&gt; _ be considered?
&lt;/h2&gt;

&lt;p&gt;Basically, when you’ve got any decent hardware or you’re just too lazy to merge all the necessary patches, because who wants to use terminal emulator with &lt;strong&gt;no scrolling&lt;/strong&gt; (xD). According to suckless philosophy, it’s not a bug, it’s a feature, but in my opinion it’s nothing but fixation about SLOC.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are alternatives?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ST
&lt;/h3&gt;

&lt;p&gt;For ST there are plenty and you probably know most of them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Termite&lt;/li&gt;
&lt;li&gt;Alacritty&lt;/li&gt;
&lt;li&gt;xTerm&lt;/li&gt;
&lt;li&gt;urxvt&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There’s nice comparison by Derek Taylor (&lt;em&gt;@distrotube&lt;/em&gt;) &lt;a href="https://www.youtube.com/watch?v=4o%5FQuwkFTf8" rel="noopener noreferrer"&gt;His top 5 minimal terminal emulators&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Window managers
&lt;/h3&gt;

&lt;p&gt;If you’re using DWM, there are nice alternatives such as XMonad and Qtile as dynamic window managers, i3wm, sway, bspwm, LeftWM, HerbsluftWM and many, many more manual window managers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Web browser
&lt;/h3&gt;

&lt;p&gt;Surf, Surf, Surf… It just sucks and it’s terribly slow. Use just anything else, even qutebrowser, just not Surf.&lt;/p&gt;

&lt;h3&gt;
  
  
  Other
&lt;/h3&gt;

&lt;p&gt;For dmenu the only piece of software which is worth consideration is Rofi. It easily handle every script made for dmenu, configuration is way more straightforward and there are plenty of scripts which are hard to port for dmenu.&lt;/p&gt;

&lt;p&gt;For sure you can also find lots of alternatives on the Internet.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Suckless isn’t that bad, but there are better, more reliable solutions on the Internet. It might feel more minimal, but you don’t have to use all the clutter provided by “cluttered” software.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>linux</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How to customize Emacs</title>
      <dc:creator>Patryk Gronkiewicz</dc:creator>
      <pubDate>Mon, 27 Jul 2020 21:10:39 +0000</pubDate>
      <link>https://forem.com/pgronkievitz/how-to-customize-emacs-1gl1</link>
      <guid>https://forem.com/pgronkievitz/how-to-customize-emacs-1gl1</guid>
      <description>&lt;p&gt;Last time I wrote why I quit vim for Emacs. This time I’ll cover customization topic.&lt;/p&gt;

&lt;p&gt;&lt;a id="org213dd7a"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Prerequisties
&lt;/h1&gt;

&lt;p&gt;First of all - I’m using &lt;a href="https://github.com/hlissner/doom-Emacs" rel="noopener noreferrer"&gt;Doom Emacs&lt;/a&gt;. It makes configuration way easier in my opinion, especially at the beginning of the Emacs adventure.&lt;br&gt;
Second - my Doom configuration files are available &lt;a href="https://github.com/pgronkievitz/doom-dots" rel="noopener noreferrer"&gt;here&lt;/a&gt;. I’ll try to update this repository more often than my dotfiles.&lt;/p&gt;

&lt;p&gt;&lt;a id="org1eaf211"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  What am I using?
&lt;/h1&gt;

&lt;p&gt;I’ve tried to recreate my vim setup as much as possible. I’ve wanted to gain some possibilities, not to change my habits. That’s why I’m using EViL mode (and I don’t want to strain my pinky). Most of my packages are language support, so nothing very interesting, but some deserve some attention.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;ein&lt;/code&gt; - support for Jupyter notebooks. It saves my day with full integration’&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;org&lt;/code&gt; - basically org mode with lots of flags;&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;web&lt;/code&gt; - emmet and some other useful stuff.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There’s also &lt;code&gt;mu4e&lt;/code&gt; which caught my eye. It’s email client for Emacs. I don’t need to load whole&lt;a href="https://mail.google.com" rel="noopener noreferrer"&gt; GMail&lt;/a&gt; website!&lt;br&gt;
I’ve also installed some packages outside of these available by default in Doom Emacs such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;code&gt;conda&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;pyvenv&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;xkcd&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;code&gt;org-ref&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a id="orgcb0da66"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Theme
&lt;/h1&gt;

&lt;p&gt;I’m big fan of Monokai Pro, so I’ve put in my config&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight common_lisp"&gt;&lt;code&gt;    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;setq&lt;/span&gt; &lt;span class="nv"&gt;doom-theme&lt;/span&gt; &lt;span class="ss"&gt;'doom-monokai-pro&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I also don’t like default font, so I’m using JetBrains Mono in size of 14.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight common_lisp"&gt;&lt;code&gt;    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;setq&lt;/span&gt; &lt;span class="nv"&gt;doom-font&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;font-spec&lt;/span&gt; &lt;span class="ss"&gt;:family&lt;/span&gt; &lt;span class="s"&gt;"JetBrainsMono Nerd Font"&lt;/span&gt; &lt;span class="ss"&gt;:size&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The best way to move with Vim keybindings in my opinion is &lt;code&gt;&amp;lt;N&amp;gt;&amp;lt;movement&amp;gt;&lt;/code&gt;. That’s why I’m using relative line numbers&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight common_lisp"&gt;&lt;code&gt;    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;setq&lt;/span&gt; &lt;span class="nv"&gt;display-line-numbers-type&lt;/span&gt; &lt;span class="ss"&gt;'relative&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a id="org0bced55"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Other customization
&lt;/h1&gt;

&lt;p&gt;There’s just &lt;em&gt;awesome&lt;/em&gt; (and &lt;strong&gt;thicc&lt;/strong&gt;) guide how to customize your own Emacs &lt;a href="https://tecosaur.github.io/emacs-config/config.html" rel="noopener noreferrer"&gt;here&lt;/a&gt; by @tecosaur.&lt;/p&gt;

</description>
      <category>emacs</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Why I left NeoVim and started using Emacs?</title>
      <dc:creator>Patryk Gronkiewicz</dc:creator>
      <pubDate>Sat, 25 Jul 2020 21:54:04 +0000</pubDate>
      <link>https://forem.com/pgronkievitz/why-i-left-neovim-and-started-using-emacs-3m3g</link>
      <guid>https://forem.com/pgronkievitz/why-i-left-neovim-and-started-using-emacs-3m3g</guid>
      <description>&lt;h1&gt;
  
  
  What emacs is?
&lt;/h1&gt;

&lt;p&gt;According to some people:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Very good operating without decent editor.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Well, basically - it’s true, but there are some hacks to make it very convinient.&lt;/p&gt;

&lt;h1&gt;
  
  
  Why did I switch?
&lt;/h1&gt;

&lt;p&gt;Reason is trivial - I was tired of constant switching between Jupyter, PyCharm, Neovim and some other things. Now I can do all necessary stuff in one place. In my case orgmode wasn’t selling point of it, beacuse I’m hardly taking any notes.&lt;/p&gt;

&lt;p&gt;What am I using now?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; orgmode! - I’m currently writing this post in it and I’m loving it. It made writing posts so much fun that I hope I’ll post more often.&lt;/li&gt;
&lt;li&gt; ein - it’s plugin/extension (I don’t know what’s the correct name for it) handling Jupyter notebooks.&lt;/li&gt;
&lt;li&gt; EViL mode - vim bindings. Everywhere.&lt;/li&gt;
&lt;li&gt; ivy - I find it the best autocompletion engine for now.&lt;/li&gt;
&lt;li&gt; doom emacs - my distribution of choice for now. I’ll probably leave it someday and tinker my own config.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Did I left vim for good?
&lt;/h2&gt;

&lt;p&gt;Of course not. Vim is still my editor of choice on servers. Emacs is just too large for quick config edits in my opinion. It’s great as GUI app, but unfortunately its terminal version just sucks.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to make emacs usable for new user?
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Use distribution
&lt;/h2&gt;

&lt;p&gt;Emacs is &lt;em&gt;swiss army chainsaw&lt;/em&gt; - it’s way more than vim, so configuration is way more complex. Emacs’ configuration files are written in elisp. It may look weird, but I find this language quite self-explanatory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwf2puo05hy5103aiinwl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwf2puo05hy5103aiinwl.jpg" alt="Toggl's comic (cropped by me)" width="800" height="588"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are two major distributions and some minor ones, but I’ll cover only big ones.&lt;/p&gt;

&lt;h3&gt;
  
  
  Spacemacs
&lt;/h3&gt;

&lt;p&gt;As far as I know it’s the most popular one. I wasn’t using it for long because it overwhelms me. It may be better for some of you, because it has a bit bigger community.&lt;/p&gt;

&lt;h3&gt;
  
  
  DOOM emacs
&lt;/h3&gt;

&lt;p&gt;That’s the one I’m using right now. It gained some popularity after DT’s video about emacs. Simple to set up and configure. Its configuration is in different folder than emacs’, so it’s a bit independent (at least it’s easier to back up).&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Emacs’ bright sides
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; It can do basically everything. Org mode is the best notetaking system I found (it even beats MS OneNote, Evernote and Notion). If it can’t do something - there’s plugin to do this for sure.&lt;/li&gt;
&lt;li&gt; org mode &amp;lt;3&lt;/li&gt;
&lt;li&gt; Support for EViL mode - Vim doesn’t have &lt;code&gt;emacs mode&lt;/code&gt; ;)&lt;/li&gt;
&lt;li&gt; It’s GUI app, so visuals are a bit better than vim or any other terminal-based application.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Emacs’ drawbacks
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt; It’s a bit &lt;em&gt;clunky&lt;/em&gt;. Its startup takes ages.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What is your opinion about emacs? Will it someday win editor war?&lt;br&gt;
If you have any questions feel free to ask, I’ll do my best to share my (poor &lt;em&gt;for now&lt;/em&gt;) knowledge with you ;).&lt;br&gt;
Stay tuned!&lt;/p&gt;

</description>
      <category>vim</category>
      <category>emacs</category>
      <category>productivity</category>
    </item>
    <item>
      <title>TensorFlow #2 - Getting started</title>
      <dc:creator>Patryk Gronkiewicz</dc:creator>
      <pubDate>Sat, 11 Jul 2020 08:22:22 +0000</pubDate>
      <link>https://forem.com/pgronkievitz/tensorflow-2-getting-started-3a9a</link>
      <guid>https://forem.com/pgronkievitz/tensorflow-2-getting-started-3a9a</guid>
      <description>&lt;p&gt;It's second post from TensorFlow 101 series, so I assume you installed conda,&lt;br&gt;
tensorflow and jupyter (preferably jupyterlab).&lt;/p&gt;
&lt;h2&gt;
  
  
  First Jupyter Notebook
&lt;/h2&gt;

&lt;p&gt;Let's create our first Jupyter notebook. To do it we need to start Jupyter&lt;br&gt;
server. We can do it with two commands. You can start with JupyterLab enabled or&lt;br&gt;
not.&lt;/p&gt;

&lt;p&gt;If you want to use lab you just have to run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jupyter lab
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and without it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jupyter notebook
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're using PyCharm or VS Code you don't have to launch it manually from&lt;br&gt;
terminal. You can run it inside the IDE/editor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Protip:&lt;/em&gt;&lt;/strong&gt; if you're using PyCharm - Scientific view is very useful. It&lt;br&gt;
displays IPython REPL, all your variables, documentation and your notebook at the&lt;br&gt;
same time.&lt;/p&gt;

&lt;p&gt;After you launched Jupyter we can create new notebook. It can be created in bare&lt;br&gt;
Jupyter in the &lt;code&gt;New&lt;/code&gt; menu on the right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fd9jue3rld1006nu6y9og.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fd9jue3rld1006nu6y9og.png" alt="Bare Jupyter" width="800" height="233"&gt;&lt;/a&gt;&lt;br&gt;
For JupyterLab it should be visible inside &lt;code&gt;Launcher&lt;/code&gt; in &lt;code&gt;Notebook&lt;/code&gt; category.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbtquyszxt2r2tdqsvhml.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbtquyszxt2r2tdqsvhml.png" alt="JupyterLab Launcher" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Otherwise you can access it in the menu bar under &lt;code&gt;File&amp;gt;New&amp;gt;Notebook&lt;/code&gt; option.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkdofjt4cvm0w0u1b780f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fkdofjt4cvm0w0u1b780f.png" alt="JupyterLab Menu" width="512" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For PyCharm you can create it with &lt;code&gt;RMB&lt;/code&gt; on the file list, with &lt;code&gt;file&lt;/code&gt; menu or&lt;br&gt;
&lt;code&gt;alt+insert&lt;/code&gt; keybind.&lt;/p&gt;
&lt;h2&gt;
  
  
  What can we do in here?
&lt;/h2&gt;

&lt;p&gt;Basically any correct code in Python should run just fine. Jupyter Notebooks are&lt;br&gt;
superior to regular scripts, because you can run your code just partially with&lt;br&gt;
blocks. It also allows to create comment blocks with markdown.&lt;/p&gt;

&lt;p&gt;As you can see in the picture - this code works perfectly fine if you launch&lt;br&gt;
block &lt;code&gt;[3]&lt;/code&gt; before &lt;code&gt;[5]&lt;/code&gt;, but there's a catch. If you run all your notebook at&lt;br&gt;
once - it'll throw an error because &lt;code&gt;a&lt;/code&gt; is declared &lt;em&gt;AFTER&lt;/em&gt; &lt;code&gt;print(a)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fatuz7rphm8asq64jme6p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fatuz7rphm8asq64jme6p.png" alt="Exammple #1 - running block at the bottom first" width="629" height="124"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu1s5udfbj2eizgrkxdco.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu1s5udfbj2eizgrkxdco.png" alt="Exammple #2 - running block at the bottom second" width="800" height="234"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Tensorflow basics
&lt;/h2&gt;

&lt;p&gt;Fist we have to import tensorflow. It's usually aliased as &lt;code&gt;tf&lt;/code&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="n"&gt;tensorflow&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;tf&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we can check installed version and check if GPU is available. Of course if&lt;br&gt;
you installed CPU-only version you won't be able to access GPU.&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="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;__version__&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;tf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;list_physical_devices&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GPU&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;I've done that in separate blocks, so for me it looks like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fimtik9i7ft0muerciijf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fimtik9i7ft0muerciijf.png" alt="Chcecks" width="569" height="179"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now we can create our first tensors (but not flow!)&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating tensors
&lt;/h3&gt;

&lt;p&gt;We can create tensor of ones with&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;tf&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ones&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;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Its argument is list of dimensions. In this example tensor has dimensions 2x3x4.&lt;br&gt;
It's very similar to nested lists in python. Let's assume tensor is (for now) &lt;br&gt;
a list - so it contains 2 lists with 3 sub-lists and 4 elements.&lt;/p&gt;

&lt;p&gt;By default TF uses float32 type. Yes, it's important to understand how does the&lt;br&gt;
type work. Every tensor can have like float16 (half precision), float32 (single&lt;br&gt;
precision), float64 (double precision), integers with proper size, strings,&lt;br&gt;
complex numbers, and many others. There's one a bit special - bfloat16 -&lt;br&gt;
this one is a bit more tricky, because it's not IEEE 754 compatible, It has&lt;br&gt;
8-bit exponent and 7 bit fraction. Half precision floats contain 5b exponent&lt;br&gt;
and 10b fraction, but use case is a bit different.&lt;/p&gt;

&lt;p&gt;There are more functions like &lt;code&gt;tf.ones()&lt;/code&gt;, but the most important one is just&lt;br&gt;
&lt;code&gt;tf.constant()&lt;/code&gt;. With this one we can create any tensor containing constant&lt;br&gt;
values. There's also &lt;code&gt;tf.Variable()&lt;/code&gt;, where our values are, of course, variable.&lt;/p&gt;

&lt;p&gt;That's all for now folks. If you've got any questions or something is unclear&lt;br&gt;
feel free to ask. I'll do my best to explain everything.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Stay tuned!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;PS. You can also subscribe to my &lt;a href="https://tinyletter.com/pgronkievitz" rel="noopener noreferrer"&gt;newsletter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>TensorFlow #1 - Installation and setup</title>
      <dc:creator>Patryk Gronkiewicz</dc:creator>
      <pubDate>Fri, 10 Jul 2020 08:12:55 +0000</pubDate>
      <link>https://forem.com/pgronkievitz/tensorflow-1-installation-setup-mpk</link>
      <guid>https://forem.com/pgronkievitz/tensorflow-1-installation-setup-mpk</guid>
      <description>&lt;p&gt;Lots of people want to start with neural networks and machine learning and I'm one of them. I've decided to share my progress in some kind of series, because teaching someone is even better method of learning for me.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to start?
&lt;/h2&gt;

&lt;p&gt;Disclaimer: Math is very useful, so start with it. I won't explain basics, so you probably want to start with KhanAcademy or something similar. The most useful are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Calculus&lt;/li&gt;
&lt;li&gt;Discrete mathematics (especially graphs &amp;amp; combinatorics).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I'm learning from &lt;a href="https://www.youtube.com/watch?v=tPYj3fFJGjk" rel="noopener noreferrer"&gt;FreeCodeCamp Tutorial&lt;/a&gt; by Tim Ruscica (&lt;em&gt;Tech with Tim&lt;/em&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;I'm using miniconda3 on Linux - it's the easiest way to use TensorFlow in my opinion. We can create virtual environments here.&lt;/p&gt;

&lt;h3&gt;
  
  
  Miniconda3 installation
&lt;/h3&gt;

&lt;p&gt;Download proper installation file from &lt;a href="https://docs.conda.io/en/latest/miniconda.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Next run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;miniconda_installation_file&lt;/span&gt;&lt;span class="sh"&gt;&amp;gt;&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations! Your conda is installed. Restart your terminal and you could see something like &lt;code&gt;(base)&lt;/code&gt; at the beginning of your prompt. You may notice that packages installed with &lt;code&gt;pip&lt;/code&gt; are not available anymore. You can disable entering &lt;code&gt;base&lt;/code&gt; environment with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conda config &lt;span class="nt"&gt;--set&lt;/span&gt; auto_activate_base &lt;span class="nb"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart your terminal once again and everything should be just like before installing conda (but it's still installed of course).&lt;/p&gt;

&lt;p&gt;You can now create new environment with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conda create &lt;span class="nt"&gt;--name&lt;/span&gt; env_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and activate it with&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conda activate env_name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  TensorFlow installation
&lt;/h3&gt;

&lt;p&gt;Conda is now installed and set up, so it's time to start with TF. It's as easy as&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conda &lt;span class="nb"&gt;install &lt;/span&gt;tensorflow-gpu &lt;span class="nt"&gt;-c&lt;/span&gt; conda-forge
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you have nVidia GPU. Just drop the &lt;code&gt;-gpu&lt;/code&gt; suffix if you don't want to use it.&lt;br&gt;
Some useful packages are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;numpy&lt;/code&gt; - blazing fast arrays&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;pandas&lt;/code&gt; - dataframes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;matplotlib&lt;/code&gt; - my tool of choice for (guess what :v) plots&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;jupyterlab&lt;/code&gt; - better version of jupyter, but I'm using PyCharm, so it doesn't matter to me.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's all for now. I'll post some new content soon(tm).&lt;/p&gt;

&lt;p&gt;PS. You can also subscribe to my &lt;a href="https://tinyletter.com/pgronkievitz" rel="noopener noreferrer"&gt;newsletter&lt;/a&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>python</category>
      <category>machinelearning</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
