<?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: Maciej Budzyński</title>
    <description>The latest articles on DEV Community by Maciej Budzyński (@budzynskimaciej).</description>
    <link>https://dev.to/budzynskimaciej</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%2F161411%2F2bee3bdc-e61d-41f3-87db-4a8111d9bb7e.jpeg</url>
      <title>DEV Community: Maciej Budzyński</title>
      <link>https://dev.to/budzynskimaciej</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/budzynskimaciej"/>
    <language>en</language>
    <item>
      <title>AI, LocalLLM and DeepSeek. What is it all about and how to dive into the world of LLM?</title>
      <dc:creator>Maciej Budzyński</dc:creator>
      <pubDate>Mon, 10 Feb 2025 20:00:00 +0000</pubDate>
      <link>https://dev.to/budzynskimaciej/ai-localllm-and-deepseek-what-is-it-all-about-and-how-to-dive-into-the-world-of-llm-3mjl</link>
      <guid>https://dev.to/budzynskimaciej/ai-localllm-and-deepseek-what-is-it-all-about-and-how-to-dive-into-the-world-of-llm-3mjl</guid>
      <description>&lt;p&gt;Artificial Intelligence (AI) has become one of the most transformative technologies of our time. From chatbots to autonomous vehicles, AI is reshaping industries and our daily lives. In this article, I will explain what AI is, how Large Language Models (LLMs) work, and how you can run AI models locally using tools like Ollama and LM Studio.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was translated from Polish using Google Translate. The original post can be found on my blog at &lt;a href="https://blog.budzynskimaciej.pl" rel="noopener noreferrer"&gt;https://blog.budzynskimaciej.pl&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  What is Artificial Intelligence?
&lt;/h1&gt;

&lt;p&gt;Artificial Intelligence (AI) refers to computer systems capable of performing tasks that typically require human intelligence. These tasks include understanding natural language, recognizing images, making decisions, and even generating creative content. AI is broadly categorized into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Narrow AI&lt;/strong&gt; – Specialized AI designed for specific tasks, like voice assistants (Siri, Alexa) or recommendation systems.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;General AI&lt;/strong&gt; – A hypothetical AI that can perform any intellectual task a human can do.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Superintelligent AI&lt;/strong&gt; – A concept where AI surpasses human intelligence in all aspects.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  What are Large Language Models (LLMs)?
&lt;/h1&gt;

&lt;p&gt;Large Language Models (LLMs) are a subset of AI designed to understand and generate human-like text. These models are trained on vast amounts of text data and use deep learning techniques to predict and generate coherent responses. Popular LLMs include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GPT (Generative Pre-trained Transformer)&lt;/strong&gt; – Developed by OpenAI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLaMA (Large Language Model Meta AI)&lt;/strong&gt; – Open-source model by Meta.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mistral &amp;amp; Mixtral&lt;/strong&gt; – Advanced LLMs focused on efficiency and performance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How LLMs Work
&lt;/h2&gt;

&lt;p&gt;LLMs operate using deep learning models based on neural networks, specifically transformer architectures. The key components of an LLM include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tokenization&lt;/strong&gt; – Breaking text into smaller units (tokens) for processing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Training on Large Datasets&lt;/strong&gt; – Learning from billions of words.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fine-tuning&lt;/strong&gt; – Adjusting the model for specific tasks like code generation or translation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Applications of LLMs
&lt;/h3&gt;

&lt;p&gt;Large Language Models have a wide range of applications, including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Conversational AI&lt;/strong&gt; – Used in chatbots like ChatGPT, customer support agents, and virtual assistants.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Content Generation&lt;/strong&gt; – Writing blog articles, generating reports, or even creating poetry and fiction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Assistance&lt;/strong&gt; – AI-powered coding assistants like GitHub Copilot help developers by generating code snippets and completing functions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Translation Services&lt;/strong&gt; – Automating language translation with tools like DeepL and Google Translate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Medical Research&lt;/strong&gt; – Assisting in diagnosing conditions, summarizing medical papers, and generating clinical notes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search and Information Retrieval&lt;/strong&gt; – Enhancing search engines with AI-powered summarization and contextual understanding.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Challenges and Limitations
&lt;/h3&gt;

&lt;p&gt;Despite their capabilities, LLMs also have challenges and limitations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bias in Training Data&lt;/strong&gt; – Since they learn from vast text sources, they can inherit biases present in those datasets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Computational Requirements&lt;/strong&gt; – Running large-scale models requires significant processing power, especially for real-time applications.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of True Understanding&lt;/strong&gt; – While LLMs generate text based on patterns, they do not possess genuine comprehension or reasoning abilities.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ethical Concerns&lt;/strong&gt; – Misuse of AI-generated content for misinformation, deepfakes, or plagiarism.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As research continues, improvements in AI safety, efficiency, and ethical guidelines will shape the future of LLM applications.&lt;/p&gt;

&lt;h1&gt;
  
  
  Running AI Models Locally
&lt;/h1&gt;

&lt;p&gt;While most AI applications rely on cloud-based models, running AI models locally offers several benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Privacy&lt;/strong&gt; – Your data stays on your machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Speed&lt;/strong&gt; – No dependency on internet connectivity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Customization&lt;/strong&gt; – Ability to fine-tune models for specific use cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Installing and Using Local AI Tools
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Ollama
&lt;/h3&gt;

&lt;p&gt;Ollama is a tool for running LLMs on your local machine with minimal setup.&lt;/p&gt;

&lt;h4&gt;
  
  
  Installation
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Windows, Mac &amp;amp; Linux:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download the executable from &lt;a href="https://ollama.ai/" rel="noopener noreferrer"&gt;ollama.ai&lt;/a&gt; and install it.&lt;/li&gt;
&lt;li&gt;Follow the on-screen instructions to complete the installation.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Running a Model
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama run mistral
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command downloads and runs the Mistral model locally. Ollama allows you to load and run different LLMs efficiently while leveraging your hardware.&lt;/p&gt;

&lt;h4&gt;
  
  
  Features of Ollama
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lightweight Execution&lt;/strong&gt; – Optimized to run models efficiently.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multiple Model Support&lt;/strong&gt; – Load different LLMs as needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ease of Use&lt;/strong&gt; – Simple command-line interface for quick access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. LM Studio
&lt;/h3&gt;

&lt;p&gt;LM Studio provides a GUI for running local AI models with ease.&lt;/p&gt;

&lt;h4&gt;
  
  
  Installation
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Download LM Studio from &lt;a href="https://lmstudio.ai/" rel="noopener noreferrer"&gt;lmstudio.ai&lt;/a&gt; and install it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Using LM Studio
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Open the application.&lt;/li&gt;
&lt;li&gt;Download a compatible model (e.g., LLaMA 2, Mistral).&lt;/li&gt;
&lt;li&gt;Interact with the model via the built-in chat interface.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Features of LM Studio
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User-Friendly Interface&lt;/strong&gt; – No need for command-line interactions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Model Management&lt;/strong&gt; – Easily download and switch between different AI models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance Optimization&lt;/strong&gt; – Ensures smooth operation on various hardware configurations.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  DeepSeek R1: A Powerful Open-Source LLM
&lt;/h1&gt;

&lt;h2&gt;
  
  
  What is DeepSeek R1?
&lt;/h2&gt;

&lt;p&gt;DeepSeek R1 is an open-source large language model (LLM) developed by the Chinese AI company DeepSeek. Designed to excel in complex reasoning tasks, including mathematics, coding, and logical problem-solving, it achieves performance comparable to leading models like OpenAI's GPT-4. Notably, DeepSeek R1 was developed with significantly fewer resources, utilizing only about 2,000 GPUs and incurring a cost of approximately $5.6 million, which is a fraction of the expenditure for similar models.&lt;/p&gt;

&lt;h3&gt;
  
  
  Performance
&lt;/h3&gt;

&lt;p&gt;In benchmark evaluations, DeepSeek R1 has demonstrated strong performance across various domains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mathematics&lt;/strong&gt;: Achieved a 79.8% Pass@1 score on the AIME 2024 benchmark.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coding&lt;/strong&gt;: Performed competitively in code-related tasks, with a 49.2% score on the SWE-bench Verified benchmark, slightly surpassing OpenAI's GPT-4.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reasoning&lt;/strong&gt;: Demonstrated effective logical reasoning capabilities, making it suitable for complex problem-solving applications.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Running DeepSeek R1 Locally with Ollama
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Download and Run DeepSeek R1
&lt;/h3&gt;

&lt;p&gt;Open your terminal or command prompt and execute the following command to download and run the DeepSeek R1 model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama run deepseek-r1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command will download the DeepSeek R1 model and run it locally on your machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Running DeepSeek R1 in the Background
&lt;/h3&gt;

&lt;p&gt;To keep DeepSeek R1 running continuously and accessible via an API, start the Ollama server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will make the model available for integration with other applications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hardware Considerations
&lt;/h3&gt;

&lt;p&gt;DeepSeek R1 offers various model sizes, ranging from 1.5 billion to 671 billion parameters. The 671B model is the original DeepSeek R1, while the smaller versions are distilled models based on Qwen and Llama architectures. If your hardware cannot support the full 671B model, you can run a smaller version by specifying the desired model size in the command. Replace &lt;code&gt;X&lt;/code&gt; with the parameter size you want to use (e.g., 1.5b, 7b, 8b, 14b, 32b, 70b):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama run deepseek-r1:Xb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This flexibility allows you to utilize DeepSeek R1's capabilities even on hardware with limited resources.&lt;/p&gt;

&lt;h3&gt;
  
  
  Accessing DeepSeek R1 via API
&lt;/h3&gt;

&lt;p&gt;Once the Ollama server is running, you can interact with DeepSeek R1 through an API. For example, using &lt;code&gt;curl&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;curl http://localhost:11434/api/chat &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
  "model": "deepseek-r1",
  "messages": [{ "role": "user", "content": "Solve: 25 * 25" }],
  "stream": false
}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command sends a request to the model to solve the multiplication problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using DeepSeek R1 in Python
&lt;/h3&gt;

&lt;p&gt;To integrate DeepSeek R1 into Python applications, install the Ollama Python package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;ollama
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, use the following script to interact with the model:&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;ollama&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ollama&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;deepseek-r1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&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;role&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;user&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;content&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;Explain Newton&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s second law of motion&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="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;response&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;message&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;content&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;This script sends a prompt to DeepSeek R1 and prints the model's response.&lt;/p&gt;

&lt;h2&gt;
  
  
  Considerations
&lt;/h2&gt;

&lt;p&gt;While DeepSeek R1 offers advanced capabilities, it's important to be aware of certain considerations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Content Moderation&lt;/strong&gt;: Reports indicate that DeepSeek R1 may provide information that is potentially harmful or sensitive, such as details on modifying bird flu viruses or promoting self-harm. This raises concerns about the model's safety and the effectiveness of its content moderation mechanisms.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Privacy&lt;/strong&gt;: As with any AI model, it's crucial to handle data responsibly and be mindful of privacy implications, especially when deploying the model in applications that process sensitive information.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;AI and LLMs are revolutionizing technology, and now you can run powerful AI models locally on your machine. Whether you prefer the command-line simplicity of Ollama or the user-friendly interface of LM Studio, local AI tools are becoming more accessible than ever. Experiment, explore, and harness the power of AI on your own terms!&lt;/p&gt;

&lt;p&gt;Running AI models locally is an exciting opportunity for developers, researchers, and enthusiasts alike. It enables deeper control, improved privacy, and efficient experimentation without relying on cloud-based services. With advancements in hardware acceleration, running large-scale models on consumer machines is becoming more practical.&lt;/p&gt;

&lt;p&gt;DeepSeek R1 is a powerful and cost-effective alternative to leading proprietary LLMs, making it an attractive choice for researchers, developers, and AI enthusiasts. By running it locally with Ollama, users can take advantage of its advanced reasoning capabilities while maintaining control over their AI infrastructure. Whether for coding, mathematics, or general problem-solving, DeepSeek R1 is a promising open-source solution for AI-driven applications.&lt;/p&gt;




&lt;p&gt;Article generated using artificial intelligence.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>python</category>
      <category>llm</category>
    </item>
    <item>
      <title>How to get access to the admin on Linux using Docker?</title>
      <dc:creator>Maciej Budzyński</dc:creator>
      <pubDate>Mon, 13 Jun 2022 19:51:48 +0000</pubDate>
      <link>https://dev.to/budzynskimaciej/how-to-get-access-to-the-admin-on-linux-using-docker-1g5a</link>
      <guid>https://dev.to/budzynskimaciej/how-to-get-access-to-the-admin-on-linux-using-docker-1g5a</guid>
      <description>&lt;p&gt;You don't have administrator rights on local hardware? Do you have Linux and Docker? If the answer to the above questions is yes, in this article I will show you how to use Docker to modify the &lt;code&gt;sudoers&lt;/code&gt; file, thanks to which you will get administrator privileges.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was translated from Polish using Google Translate. The original post can be found on my blog at &lt;a href="https://blog.budzynskimaciej.pl/post/docker-sudo-tricks/" rel="noopener noreferrer"&gt;https://blog.budzynskimaciej.pl&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;The method presented here requires that the restricted user has access to docker commands, i.e. the user belongs to the docker group. Docker configuration requires that the user belongs to this group. This method only works on Linux (tested on Ubuntu).&lt;/p&gt;

&lt;h2&gt;
  
  
  TLDR
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Run alpine linux with the file &lt;code&gt;/etc/sudoers&lt;/code&gt; mounted as &lt;code&gt;sudoers&lt;/code&gt; in the container:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker run &lt;span class="nt"&gt;-it&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; /etc/sudoers:/sudoers &lt;span class="nt"&gt;--rm&lt;/span&gt; alpine /bin/sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Changing permissions to edit &lt;code&gt;sudoers&lt;/code&gt; with vi:
&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;chmod &lt;/span&gt;777 sudoers
vi sudoers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Adding the required permissions to the user in the &lt;code&gt;sudoers&lt;/code&gt; file (the &lt;code&gt;i&lt;/code&gt; key to add an entry):
&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="c"&gt;# A tab is required between user and ALL (TAB once, not 4 spaces)&lt;/span&gt;
user    &lt;span class="nv"&gt;ALL&lt;/span&gt;&lt;span class="o"&gt;=(&lt;/span&gt;ALL:ALL&lt;span class="o"&gt;)&lt;/span&gt; ALL
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Exit save from vi:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;:wq
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Re-changing the permissions of the &lt;code&gt;sudoers&lt;/code&gt; file to the default values and exiting the container console:
&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;chmod &lt;/span&gt;755 sudoers
&lt;span class="nb"&gt;exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Verifying changes to the &lt;code&gt;sudoers&lt;/code&gt;:
&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;cat&lt;/span&gt; /etc/sudoers
&lt;span class="nb"&gt;sudo &lt;/span&gt;su
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Description of individual commands
&lt;/h2&gt;

&lt;h3&gt;
  
  
  docker run -it -v /etc/sudoers:/sudoers –rm alpine /bin/sh
&lt;/h3&gt;

&lt;p&gt;This command allows you to get an alpine linux image and then fire the container from that image. The &lt;code&gt;-it&lt;/code&gt; parameter is responsible for launching interactive mode (keeps &lt;code&gt;STDIN&lt;/code&gt; open, even if it's not connected) and allocating a pseudo-TTY. The &lt;code&gt;-v&lt;/code&gt; parameter binds the host directory or file to the container volume. In this case, we bind the host file &lt;code&gt;/etc/sudoers&lt;/code&gt; to the &lt;code&gt;sudoers&lt;/code&gt; file in the root of our container. The &lt;code&gt;--rm&lt;/code&gt; parameter causes the created container to be deleted when exiting and exiting the shell. The &lt;code&gt;alpine /bin/sh&lt;/code&gt; fragment is responsible for selecting the image from which the container will be created (in this case, linux alpine) and launching the command (program) &lt;code&gt;/bin/sh&lt;/code&gt;, i.e. the system shell.&lt;/p&gt;

&lt;h3&gt;
  
  
  chmod 777 sudoers and vi sudoers
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;/etc/sudoers&lt;/code&gt; file is protected against editing by default. Due to alpine being a minimalistic linux distro it comes with the vi file editor by default. &lt;code&gt;sudoers&lt;/code&gt; file should be edited with &lt;code&gt;visudo&lt;/code&gt;, however alpine does not have this installed by default. In order to edit the file, give full permission to the file to the current user using the &lt;code&gt;chmod 777 sudoers&lt;/code&gt; command launched in the alpine container. Then you can open the &lt;code&gt;sudoers&lt;/code&gt; file using the vi editor with the command: &lt;code&gt;vi sudoers&lt;/code&gt;. To enter text in the vi editor, press the &lt;code&gt;i&lt;/code&gt; button on the keyboard.&lt;/p&gt;

&lt;h3&gt;
  
  
  user    ALL=(ALL:ALL) ALL
&lt;/h3&gt;

&lt;p&gt;The above entry allows you to add user permissions to execute all commands. The first field indicates the name of the user affected by the rule (&lt;code&gt;user&lt;/code&gt;). The first &lt;code&gt;ALL&lt;/code&gt; means that this rule applies to all hosts. The second &lt;code&gt;ALL&lt;/code&gt; means that user user can run commands as all users. The third &lt;code&gt;ALL&lt;/code&gt; means that user user can run commands as all groups. The fourth &lt;code&gt;ALL&lt;/code&gt; means that these rules apply to all commands (commands). Remember to keep the appropriate formatting in the file. In Ubuntu, between &lt;code&gt;user&lt;/code&gt; and &lt;code&gt;ALL&lt;/code&gt; was a single tab spacing (not four spaces). Personally, I'm not sure if using a single space or 4 spaces won't break anything, so I kept the target formatting to be sure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Exiting vi
&lt;/h3&gt;

&lt;p&gt;To exit the vi editor and save changes, press the &lt;code&gt;esc&lt;/code&gt; key on the keyboard, and then type &lt;code&gt;:wq&lt;/code&gt;. The commands after the colon are commands for vi. &lt;code&gt;w&lt;/code&gt; means that we want to save the changes made to the file and &lt;code&gt;q&lt;/code&gt; means close the file.&lt;/p&gt;

&lt;h3&gt;
  
  
  chmod 755 sudoers and exit
&lt;/h3&gt;

&lt;p&gt;We change the permissions on the sudoers file to the default values before editing, and then exit the container shell with the &lt;code&gt;exit&lt;/code&gt; command. Upon departure, the alpine container will be removed. Only the downloaded image will remain on the disk.&lt;/p&gt;

&lt;h3&gt;
  
  
  cat /etc/sudoers and sudo su
&lt;/h3&gt;

&lt;p&gt;In order to verify the accesses, we can use the command &lt;code&gt;cat /etc/sudoers&lt;/code&gt; to check if the entries were added correctly. We can also use the &lt;code&gt;sudo su&lt;/code&gt; command to check if we can execute commands as sudo.&lt;/p&gt;

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

&lt;p&gt;As you can see, docker allows you to change user permissions and modify files that we do not have access to by default. The Docker group belongs to the administration groups, so that a user in this group who has access to execute docker commands has the option of any modification of files without the need to access administrator rights.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>linux</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>What is Blockchain?</title>
      <dc:creator>Maciej Budzyński</dc:creator>
      <pubDate>Mon, 13 Jun 2022 19:35:19 +0000</pubDate>
      <link>https://dev.to/budzynskimaciej/what-is-blockchain-2l9b</link>
      <guid>https://dev.to/budzynskimaciej/what-is-blockchain-2l9b</guid>
      <description>&lt;p&gt;Blockchain is a popular word in the depths of the Internet recently. In this article, I will try to expose what the famous Blockchain is and what it can be useful for.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was translated from Polish using Google Translate. The original post can be found on my blog at &lt;a href="https://blog.budzynskimaciej.pl/post/blockchain-p1/" rel="noopener noreferrer"&gt;https://blog.budzynskimaciej.pl&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Data structures
&lt;/h2&gt;

&lt;p&gt;At the beginning, it is necessary to explain what data structures are to be able to understand what blockchain is. Data structures, in general, are a way of organizing, managing, and storing data in a computer's memory. More specifically, a data structure is a collection of data values, the relationships between them, and the functions or operations that can be applied to the data. Different data structures serve different purposes, such as relational databases that use B-tree indexes to retrieve data, and some compiler implementations use hash tables to look up identifiers. The data structures include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Record, also known as a structure or a tuple (e.g. a point with coordinates X, Y)&lt;/li&gt;
&lt;li&gt;Tables&lt;/li&gt;
&lt;li&gt;List (one or two way)&lt;/li&gt;
&lt;li&gt;Object&lt;/li&gt;
&lt;li&gt;Tree&lt;/li&gt;
&lt;li&gt;Hash table&lt;/li&gt;
&lt;li&gt;Graph&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and many, many more of the different variations of the above data structures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Blockchain
&lt;/h2&gt;

&lt;p&gt;Blockchain is a data structure. Specifically, it is a kind of one-way list containing strongly interconnected blocks using cryptography. Each block contains the previous block hash, timestamp, and transaction data. The exception is the so-called Genesis Block. It is the first block to form a chain of links with other blocks. The assumption of the blockchain is resistance to data modification and easy verification if the data has not been counterfeited. Modification of any block results in the generation of completely different hashes for subsequent blocks, which allows you to easily verify that the data has not been counterfeited.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is it for and who is it for?
&lt;/h2&gt;

&lt;p&gt;Currently, the use of blockchain is primarily the support of various transactions, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stocks&lt;/li&gt;
&lt;li&gt;Currencies&lt;/li&gt;
&lt;li&gt;Trade&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main application of this data structure can be seen in cryptocurrencies such as Bitcoin. In the next articles I will try to implement an example blockchain.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>programming</category>
      <category>web3</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Forestry and Hugo</title>
      <dc:creator>Maciej Budzyński</dc:creator>
      <pubDate>Mon, 13 Jun 2022 19:29:35 +0000</pubDate>
      <link>https://dev.to/budzynskimaciej/forestry-and-hugo-1jp0</link>
      <guid>https://dev.to/budzynskimaciej/forestry-and-hugo-1jp0</guid>
      <description>&lt;p&gt;I haven't written here for a long time, but it's worth refreshing this blog a bit. Today's post will be short, and in the post I'm going to present the integration of Hugo with the Forestry.io platform.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was translated from Polish using Google Translate. The original post can be found on my blog at &lt;a href="https://blog.budzynskimaciej.pl/post/forestry-and-hugo/" rel="noopener noreferrer"&gt;https://blog.budzynskimaciej.pl&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Forestry.io?
&lt;/h2&gt;

&lt;p&gt;Simply put, Forestry.io is the visual editor of our website. With Forestry.io, the ability to publish and edit pages using a web browser is added.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integration
&lt;/h2&gt;

&lt;p&gt;Integrating Hugo with Forestry.io is simple. Just log in to &lt;a href="https://app.forestry.io/" rel="noopener noreferrer"&gt;https://app.forestry.io/&lt;/a&gt; using our Github account and fill in the data requested by the website. After integration, just log in, go to the tab with posts and add or edit them with the Markdown visual editor. And that's all for today.&lt;/p&gt;

&lt;p&gt;This post was added using &lt;a href="https://app.forestry.io/" rel="noopener noreferrer"&gt;https://app.forestry.io/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>hugo</category>
      <category>forestry</category>
      <category>programming</category>
    </item>
    <item>
      <title>Beautifying strings, or how to format strings in Python</title>
      <dc:creator>Maciej Budzyński</dc:creator>
      <pubDate>Mon, 13 Jun 2022 19:21:54 +0000</pubDate>
      <link>https://dev.to/budzynskimaciej/beautifying-strings-or-how-to-format-strings-in-python-3ol1</link>
      <guid>https://dev.to/budzynskimaciej/beautifying-strings-or-how-to-format-strings-in-python-3ol1</guid>
      <description>&lt;p&gt;There are two methods of formatting strings in python. This situation continued until Python 3.6 came along with the advent of f-strings. Today I will try to discuss all formatting methods, and give an example of their use.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was translated from Polish using Google Translate. The original post can be found on my blog at &lt;a href="https://blog.budzynskimaciej.pl/post/string-in-python/" rel="noopener noreferrer"&gt;https://blog.budzynskimaciej.pl&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The code we will work with
&lt;/h2&gt;

&lt;p&gt;We will use a few simple variables that I will try to display using each of the available formatting methods.&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;first_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;John&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;last_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;Doe&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;born_year&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1978&lt;/span&gt;
&lt;span class="n"&gt;current_age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;
&lt;span class="nb"&gt;dict&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;text&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;One&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;value&lt;/span&gt;&lt;span class="sh"&gt;'&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Old formatting with '%' sign
&lt;/h2&gt;

&lt;p&gt;This formatting has been in Python for a long time. Currently, this method is not recommended by the Python documentation as it has some drawbacks and may cause problems with the display of tuples and lists. Below is an example of using this formatting:&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello %s %s. Your born year is %d. You are %d years old&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;born_year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;current_age&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What does% s mean? It just tells the interpreter that we want to read a string. Available modifiers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;%s&lt;/code&gt; - A string (or any object that has a repr method, e.g. an array))&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;%d&lt;/code&gt; - Whole numbers&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;%f&lt;/code&gt; - Floating point numbers&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;%.(X)&lt;/code&gt; - A floating point number with a precision of X decimal numbers&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;%X&lt;/code&gt; - An integer represented in hexadecimal notation&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Format with &lt;code&gt;str.format()&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;This option was introduced in Python 2.6. This is an improved formatting relative to %-formatting. Thanks to &lt;code&gt;str.format()&lt;/code&gt;, the fields we intend to substitute are represented by the characters &lt;code&gt;{}&lt;/code&gt;. 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="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello {2} {3}. Your born year is {1}. You are {0} years old.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current_age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;born_year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;first_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;last_name&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can also display the content of dictionaries by unpacking them:&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;{text} is {value}.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The new way, or f-Strings in Python 3.6
&lt;/h2&gt;

&lt;p&gt;The introduction of f-Strings has made formatting even easier. 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="nf"&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;first_name&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;last_name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;. Your born year is &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;born_year&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;. You are &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;current_year&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; years old&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;That's it, f-strings are executed at runtime. You just enter a variable defined earlier in &lt;code&gt;{}&lt;/code&gt;. You can also use expressions, e.g .:&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="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="si"&gt;}&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;This code will output the value of the expression 2 * 6, which is 12. You can also call functions:&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;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;jane&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="nf"&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="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;capitalize&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="si"&gt;}&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;The above code will display the text: &lt;code&gt;Jane&lt;/code&gt;. We can also display the content of dictionaries:&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="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;text&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; is &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;value&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, it is worth using f-Strings, because they increase our productivity and do not obscure the code. They are also a bit faster to execute than %-Strings and &lt;code&gt;str.format()&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
    <item>
      <title>Blog based on the Hugo static page generator</title>
      <dc:creator>Maciej Budzyński</dc:creator>
      <pubDate>Mon, 13 Jun 2022 18:57:36 +0000</pubDate>
      <link>https://dev.to/budzynskimaciej/blog-based-on-the-hugo-static-page-generator-35ga</link>
      <guid>https://dev.to/budzynskimaciej/blog-based-on-the-hugo-static-page-generator-35ga</guid>
      <description>&lt;p&gt;Nowadays, everyone has their own website on the Internet. I decided to start a blog based on Hugo technology.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was translated from Polish using Google Translate. The original post can be found on my blog at &lt;a href="https://blog.budzynskimaciej.pl/post/blog/" rel="noopener noreferrer"&gt;https://blog.budzynskimaciej.pl&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The beginnings of blogging
&lt;/h2&gt;

&lt;p&gt;I started my adventure with a blog created with Wordpress. The configuration options, the number of templates and add-ons were all overwhelming. Wordpress was a very simple tool, but it also had a few flaws, it required PHP and a Database, and the loading time increased as the page grows. In addition, free hosting was not able to keep a lot of traffic on the sites.&lt;/p&gt;

&lt;h2&gt;
  
  
  Static page generators
&lt;/h2&gt;

&lt;p&gt;Then I got acquainted with tools for generating static pages. I started by using the most popular of them Jekyll. And here the first problems arose. As a Windows user, I started having problems configuring and installing Ruby. Problems with certificates, problems with the bundler, with updating add-ons and Jekyll itself. Although Jekyll is a powerful tool that allows you to install add-ons and freely modify the appearance of the page, Ruby + Windows = Torment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hugo, a GoLang based static page generator
&lt;/h2&gt;

&lt;p&gt;I decided to look for an alternative to Jekyll and this is how I came across Hugo, or actually goHugo (entering the phrase Hugo alone may be associated with finding a troll named Hugo known from an interactive television program for children). Hugo is just like Jekyll a static page generator, however written in the compiled GoLang language. We don't have to know anything about Go to be able to use Hugo. The only knowledge we need is the knowledge related to HTML and CSS if we want to edit or create our own templates and Markdown to write our posts.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Advantages&lt;/th&gt;
&lt;th&gt;Disadvantages&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Simple post creation using &lt;strong&gt;Markdown&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Requires knowledge of &lt;strong&gt;GIT&lt;/strong&gt; if you intend to use GitHub Pages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Easy appearance management thanks to &lt;strong&gt;HTML&lt;/strong&gt; and &lt;strong&gt;CSS&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;Adding special features may require knowledge of &lt;strong&gt;Go&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Simple and comprehensive documentation at the same time&lt;/td&gt;
&lt;td&gt;Most web hosts require throwing the entire Public folder&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  The adventure with Hugo begins
&lt;/h2&gt;

&lt;p&gt;To start your adventure with Hugo, &lt;a href="https://github.com/gohugoio/hugo/releases" rel="noopener noreferrer"&gt;download the latest version from the GitHub repository&lt;/a&gt;. From there, we download the latest version depending on the operating system you have: &lt;em&gt;In my case, as of the day of writing the news, it is &lt;code&gt;hugo_0.40.1_Windows-64bit.zip&lt;/code&gt;.&lt;/em&gt; For Windows, just unpack the &lt;code&gt;hugo.exe&lt;/code&gt; file anywhere: I recommend &lt;code&gt;C:/Hugo/&lt;/code&gt; Then add the directory containing the above-mentioned file to the &lt;strong&gt;PATH&lt;/strong&gt; environment variable. If we did everything correctly, the hugo help command should work. in case of problems, I refer you to the &lt;a href="https://gohugo.io/tutorials/installing-on-windows/" rel="noopener noreferrer"&gt;official Hugo documentation related to its installation on Windows in English&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lastly, I leave a video related to quick installation and activation of our first blog in Hugo
&lt;/h3&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/w7Ft2ymGmfc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>go</category>
      <category>hugo</category>
      <category>wordpress</category>
      <category>blog</category>
    </item>
    <item>
      <title>Which programming language to choose at the beginning, i.e. multi-Hello World</title>
      <dc:creator>Maciej Budzyński</dc:creator>
      <pubDate>Mon, 13 Jun 2022 18:40:20 +0000</pubDate>
      <link>https://dev.to/budzynskimaciej/which-programming-language-to-choose-at-the-beginning-ie-multi-hello-world-3dip</link>
      <guid>https://dev.to/budzynskimaciej/which-programming-language-to-choose-at-the-beginning-ie-multi-hello-world-3dip</guid>
      <description>&lt;p&gt;Are you thinking about choosing a programming language? You have no idea which one to choose? Then this post is for you. I have prepared short descriptions of various programming languages and the basic code of the Hello World program.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This article was translated from Polish using Google Translate. The original post can be found on my blog at &lt;a href="https://blog.budzynskimaciej.pl/post/helloworld/" rel="noopener noreferrer"&gt;https://blog.budzynskimaciej.pl&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Golang
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight go"&gt;&lt;code&gt;&lt;span class="k"&gt;package&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="s"&gt;"fmt"&lt;/span&gt;
&lt;span class="k"&gt;func&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="n"&gt;fmt&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello World&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Statically typed, multi-paradigm programming language developed by Google employees Robert Griesemer, Rob Pike, and Ken Thompson in 2009. It has a built-in Garbage Collector. It significantly facilitates concurrent programming thanks to the so-called GoRutines. Functions can return more than one result. Unfortunately, Go 1.10 does not currently support generics.&lt;/p&gt;

&lt;h2&gt;
  
  
  JavaScript
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Frontend language. Required when writing web applications. It is used to create interactive views on web pages. Dynamically typed (duck-typing), a multi-paradigm, prototyping programming language developed by Netscape in 1995. Thanks to its server implementation, NodeJS has a huge library of frameworks, including Angular from Google and React from Facebook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Java
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Hello&lt;/span&gt;&lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(){&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello World"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A fully object-oriented, statically typed language. Currently, it is one of the most popular programming languages in which you can find a job without major problems. Created in 1995 by Sun Microsystems. Its main application is enterprise-class web applications. It is often used with Spring Framework for application development. Java was created with architecture independence in mind, so we can run it on any machine with a Java virtual machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  C Sharp
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csharp"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;HelloWorld&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="k"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;Main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;System&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;WriteLine&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello, World!"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Microsoft's answer to Java. Also designed as a fully object oriented, statically typed programming language. It has many elements of C ++ and Java. The .NET virtual machine can be run on many systems, mainly due to .NET Core&lt;/p&gt;

&lt;h2&gt;
  
  
  C
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;stdio.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello World!&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One of the oldest languages, currently used to write microcontrollers. Currently, it is also used in the development of the Linux kernel. It has no classes, but is small and can compile on any platform. It is a statically typed language.&lt;/p&gt;

&lt;h2&gt;
  
  
  C++
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;iostream.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;cout&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt; &lt;span class="s"&gt;"Hello World!"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Improved C, has classes, templates (generics), inheritance mechanisms. Basically this is C on steroids. Used where the speed of our applications counts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python
&lt;/h2&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello World&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;Dynamically typed and interpreted language. Very easy to learn, it is used in many areas of computer science, from simple scripts, through websites (using the Django or Flask frameworks), to Artificial Intelligence (Machine Learning, Deep Learning). Thanks to dynamic typing, we can not worry about specifying the data type, unfortunately because it is an interpreted language, we will not be able to detect errors before starting the application, and the performance of our applications will not be as good as in the case of applications written in C or C ++ (it all depends on the algorithm used) .&lt;/p&gt;

&lt;h2&gt;
  
  
  Ruby
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="nb"&gt;puts&lt;/span&gt; &lt;span class="s1"&gt;'Hello, world!'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Like Python, it is a dynamically typed and interpreted language. Currently, its main use is WebDev thanks to the Ruby on Rails framework, which allows for rapid prototyping and writing web applications. Ruby on Rails itself has a scaffolding mechanism for our applications (Scaffolding), thanks to which we can create a simple website using databases, views and controllers in a few minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  PHP
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt; &lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'&amp;lt;p&amp;gt;Hello World&amp;lt;/p&amp;gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A language considered by many to be dying out, intended exclusively for WebDev. Nevertheless, it is still very popular thanks to a CMS called Wordpress, which was written in PHP. Wordpress itself does not require knowledge of PHP, but writing add-ons may require knowledge of PHP.&lt;/p&gt;

&lt;h2&gt;
  
  
  Haskell
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight haskell"&gt;&lt;code&gt;&lt;span class="n"&gt;main&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;putStrLn&lt;/span&gt; &lt;span class="s"&gt;"Hello World"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A language with the functional programming paradigm. Perfect for learning just this programming style. I was not allowed to use it, so I will not write much about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Malbolge
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(=&amp;lt;`$9]7&amp;lt;5YXz7wT.3,+O/o'K%$H"'~D|#z@b=`{^Lx8%$Xmrkpohm-kNi;gsedcba`_^]\[ZYXWVUTSRQPONMLKJIHGFEDCBA@?&amp;gt;=&amp;lt;;:9876543s+O&amp;lt;oLm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>python</category>
      <category>java</category>
      <category>go</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
