<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Serawork Wallelign on Medium]]></title>
        <description><![CDATA[Stories by Serawork Wallelign on Medium]]></description>
        <link>https://medium.com/@serawork?source=rss-1800e311436b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xLnuUW_jl0y_Wx8hA2a4vA.jpeg</url>
            <title>Stories by Serawork Wallelign on Medium</title>
            <link>https://medium.com/@serawork?source=rss-1800e311436b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 21:19:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@serawork/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Python for Data Science: Part II]]></title>
            <link>https://medium.com/@serawork/python-for-data-science-part-ii-8f32cfa3f2c7?source=rss-1800e311436b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f32cfa3f2c7</guid>
            <category><![CDATA[control-flow]]></category>
            <category><![CDATA[basic-python]]></category>
            <dc:creator><![CDATA[Serawork Wallelign]]></dc:creator>
            <pubDate>Fri, 24 Feb 2023 07:26:40 GMT</pubDate>
            <atom:updated>2023-02-28T13:25:18.533Z</atom:updated>
            <content:encoded><![CDATA[<p>Python is a powerful programming language used extensively in the field of data science. It has become the go-to language for data scientists because of its simplicity, flexibility, and the availability of various data science libraries. It is one of the <a href="https://lifesmartly.com/top-10-programming-languages-employers-want-in-2023/">top programming skills</a> sought by employers. This is a quick tutorial for Python for Data Science.</p><h3>Python Basics</h3><p>In<a href="https://medium.com/@serawork/introduction-to-python-for-data-science-31b1004693d5"> the first part of the tutorial</a>, we have seen how to install python and important libraries.</p><p>In this tutorial, we will cover some of the essential Python basics, including data types and variables, control flow statements, functions and modules, and list and dictionary comprehensions.</p><h3>Data Types and Variables</h3><p>In Python, everything is an object, and every object has a type. Some of the common data types in Python include integers, floating-point numbers, strings, booleans, and lists. To create a variable in Python, you simply need to assign a value to it using the equal sign (=). Here’s an example:</p><pre>x = 10<br>y = 3.14<br>name = &quot;John&quot;<br>is_active = True</pre><p>In the example above, we have created four variables: x, y, name, and is_active. x is an integer, y is a floating-point number, name is a string, and is_active is a boolean.</p><h3>Control Flow Statements</h3><p>Control flow statements are used to control the flow of execution of a program. The three main types of control flow statements in Python are if-else statements, for loops, and while loops.</p><h4>If-else Statements</h4><p>If-else statements are used to execute a block of code if a certain condition is met. Here’s an example:</p><pre>x = 10<br>if x &gt; 5:<br>    print(&quot;x is greater than 5&quot;)<br>else:<br>    print(&quot;x is less than or equal to 5&quot;)</pre><p>In the example above, we have used an if-else statement to check whether x is greater than 5. If the condition is true, the first block of code will be executed, and if it’s false, the second block of code will be executed.</p><h4>For Loops</h4><p>For loops are used to iterate over a sequence of values, such as a list or a string. Here’s an example:</p><pre>fruits = [&quot;apple&quot;, &quot;banana&quot;, &quot;orange&quot;]<br>for fruit in fruits:<br>    print(fruit)</pre><p>In the example above, we have used a for loop to iterate over the fruits list and print each item.</p><h4>While Loops</h4><p>While loops are used to execute a block of code as long as a certain condition is true. Here’s an example:</p><pre>i = 1<br>while i &lt;= 5:<br>    print(i)<br>    i += 1</pre><p>In the example above, we have used a while loop to print the numbers from 1 to 5.</p><h3>Functions and Modules</h3><p>Functions and modules are used to organize code and make it reusable. A function is a block of code that performs a specific task, and a module is a file that contains a collection of functions and variables.</p><h4>Functions</h4><p>To define a function in Python, you use the “def” keyword, followed by the function name and the function parameters. Here’s an example:</p><pre>def add_numbers(x, y):<br>    return x + y</pre><p>In the example above, we have defined a function called add_numbers that takes two parameters (x and y) and returns their sum.</p><h4>Modules</h4><p>To use a function from a module, you first need to import the module using the “import” keyword. Here’s an example:</p><pre>import math</pre><pre>x = math.sqrt(25)<br>print(x)</pre><p>In the example above, we have imported the math module and used the sqrt function to calculate the square root of 25.</p><h3>List and Dictionary Comprehensions</h3><p>List and dictionary comprehensions are a concise way to create lists and dictionaries in Python.</p><h4>List Comprehensions</h4><p>To create a list using list comprehensions, you use a for loop and an expression to generate the list. Here’s an example:</p><pre>numbers = [1, 2, 3, 4, 5]<br>squares = [x ** 2 for x in numbers]<br>print(squares)</pre><p>In the example above, we have used a list comprehension to generate a list of squares of the numbers in the “numbers” list.</p><h4>Dictionary Comprehensions</h4><p>To create a dictionary using dictionary comprehensions, you use a for loop and a key-value expression to generate the dictionary. Here’s an example:</p><pre>fruits = [&quot;apple&quot;, &quot;banana&quot;, &quot;orange&quot;]<br>fruit_lengths = {fruit: len(fruit) for fruit in fruits}<br>print(fruit_lengths)</pre><p>In the example above, we have used a dictionary comprehension to generate a dictionary that contains the lengths of the fruits in the “fruits” list.</p><h3>Conclusion</h3><p>In this tutorial, we have covered some of the essential Python basics, including data types and variables, control flow statements, functions and modules, and list and dictionary comprehensions. These concepts are fundamental to Python programming and will form the building blocks for more advanced topics in Python. In <a href="https://medium.com/@serawork/python-for-data-science-partiii-bf50f12879dd">Part III we will discuss NumPy for Data Science.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f32cfa3f2c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python for Data Science: PartIII]]></title>
            <link>https://medium.com/@serawork/python-for-data-science-partiii-bf50f12879dd?source=rss-1800e311436b------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf50f12879dd</guid>
            <dc:creator><![CDATA[Serawork Wallelign]]></dc:creator>
            <pubDate>Thu, 23 Feb 2023 14:44:20 GMT</pubDate>
            <atom:updated>2023-02-28T13:16:06.738Z</atom:updated>
            <content:encoded><![CDATA[<p>Python is a powerful programming language used extensively in the field of data science. It has become the go-to language for data scientists because of its simplicity, flexibility, and the availability of various data science libraries. It is one of the <a href="https://lifesmartly.com/top-10-programming-languages-employers-want-in-2023/">top programming skills</a> sought by employers. This is a quick tutorial for Python for Data Science.</p><p>Read <a href="https://medium.com/@serawork/introduction-to-python-for-data-science-31b1004693d5">Part I:Introduction to Python</a>, <a href="https://medium.com/@serawork/python-for-data-science-part-ii-8f32cfa3f2c7">Part II: Pyhon Basics</a></p><h3>NumPy for Data Science</h3><p>NumPy is a popular Python library used for scientific computing and data analysis. It provides support for large, multi-dimensional arrays and matrices, as well as a wide range of mathematical functions to operate on them.</p><p>In this tutorial, we will cover some of the essential NumPy basics, including creating and manipulating arrays, array operations and broadcasting, and linear algebra with NumPy.</p><h3>Introduction to NumPy</h3><p>NumPy is a third-party library for Python that provides support for large, multi-dimensional arrays and matrices. NumPy arrays are more efficient than Python lists, as they use less memory and allow for faster computations. NumPy also provides a wide range of mathematical functions that can be used to operate on arrays.</p><p>To use NumPy in your Python programs, you first need to install it using a package manager like pip or conda. Once installed, you can import NumPy using the following code:</p><pre>pimport numpy as np</pre><p>In the example above, we have imported NumPy and given it the alias “np”, which is a common convention in the Python community.</p><h3>Creating and Manipulating Arrays</h3><p>In NumPy, arrays can be created in various ways, such as using the “array” function, the “zeros” function, and the “ones” function. Here are some examples:</p><pre>import numpy as np</pre><pre># Create an array from a list<br>a = np.array([1, 2, 3])<br># Create an array of zeros<br>b = np.zeros((3, 3))<br># Create an array of ones<br>c = np.ones((2, 2))<br># Create a random array<br>d = np.random.rand(2, 2)</pre><p>In the example above, we have created four arrays using different NumPy functions.</p><p>Arrays in NumPy can be manipulated in various ways, such as reshaping, slicing, and indexing. Here are some examples:</p><pre>import numpy as np</pre><pre># Create a 2D array<br>a = np.array([[1, 2, 3], [4, 5, 6]])<br># Reshape the array<br>b = a.reshape((3, 2))<br># Slice the array<br>c = a[:, 1:]<br># Index the array<br>d = a[0, 2]</pre><p>In the example above, we have created a 2D array “a” and manipulated it using the “reshape”, “slice”, and “index” operations.</p><h3>Array Operations and Broadcasting</h3><p>NumPy provides a wide range of mathematical functions that can be used to operate on arrays. These functions include addition, subtraction, multiplication, division, and more. In NumPy, these operations can be performed element-wise on arrays of the same shape, using what is called “array broadcasting”.</p><p>Here are some examples:</p><pre>import numpy as np</pre><pre># Create two arrays<br>a = np.array([[1, 2], [3, 4]])<br>b = np.array([[5, 6], [7, 8]])<br># Add the arrays<br>c = a + b<br># Subtract the arrays<br>d = a - b<br># Multiply the arrays<br>e = a * b<br># Divide the arrays<br>f = a / b</pre><p>In the example above, we have created two arrays “a” and “b” and performed element-wise operations on them using array broadcasting.</p><h3>Linear Algebra with NumPy</h3><p>NumPy provides support for linear algebra operations, such as matrix multiplication, determinant calculation, and eigendecomposition. Here are some examples:</p><pre>import numpy as np</pre><pre># Create two matrices<br>a = np.array([[1, 2], [3, 4]])<br>b = np.array([[5, 6], [7, 8]])</pre><h3>Multiply the matrices</h3><pre>c = np.dot(a, b)<br># Calculate the determinant of a matrix<br>d = np.linalg.det(a)<br># Calculate the eigenvectors and eigenvalues of a matrix<br>eig_vals, eig_vecs = np.linalg.eig(a)</pre><p>In the example above, we have performed matrix multiplication, determinant calculation, and eigendecomposition using NumPy functions.</p><h3>Conclusion</h3><p>In this tutorial, we have covered some of the essential NumPy basics, including creating and manipulating arrays, array operations and broadcasting, and linear algebra with NumPy. NumPy provides a powerful toolset for scientific computing and data analysis in Python, and these basics will help you get started with using it in your own programs. With NumPy, you can easily work with large, multi-dimensional arrays and perform complex mathematical operations on them, making it an essential library for any data scientist or machine learning practitioner.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf50f12879dd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Python for Data Science]]></title>
            <link>https://medium.com/@serawork/introduction-to-python-for-data-science-31b1004693d5?source=rss-1800e311436b------2</link>
            <guid isPermaLink="false">https://medium.com/p/31b1004693d5</guid>
            <category><![CDATA[introduction-to-python]]></category>
            <category><![CDATA[installation-python]]></category>
            <category><![CDATA[python-for-data-science]]></category>
            <dc:creator><![CDATA[Serawork Wallelign]]></dc:creator>
            <pubDate>Thu, 23 Feb 2023 13:51:27 GMT</pubDate>
            <atom:updated>2023-02-24T11:36:34.691Z</atom:updated>
            <content:encoded><![CDATA[<h3>Python for Data Science: Part I</h3><p>Python is a powerful programming language used extensively in the field of data science. It has become the go-to language for data scientists because of its simplicity, flexibility, and the availability of various data science libraries. It is one of the <a href="https://lifesmartly.com/top-10-programming-languages-employers-want-in-2023/">top programming skills</a> sought by employers. This is a quick tutorial for Python for Data Science.</p><p><a href="https://medium.com/@serawork/python-for-data-science-part-ii-8f32cfa3f2c7">Part II: The Basics of Python</a></p><h3>Introduction to Python</h3><p>In this tutorial, we will provide a brief overview of data science and Python, guide you through the process of installing Python and required libraries, and demonstrate how to run Python code in Jupyter Notebook.</p><h3>Overview of Data Science and Python</h3><p>Data science is an interdisciplinary field that uses scientific methods, processes, algorithms, and systems to extract knowledge and insights from structured and unstructured data. It involves the use of statistical and machine learning techniques to gain meaningful insights from data. Python is a popular language in data science because of its simplicity, readability, and extensive library support.</p><p>Python has a wide range of libraries available for data science such as NumPy, Pandas, Matplotlib, and Scikit-learn. These libraries provide powerful tools for data manipulation, analysis, visualization, and machine learning. They allow data scientists to work efficiently and effectively with large datasets, making Python a preferred language in data science.</p><h3>Installing Python and Required Libraries</h3><p>To get started with Python for data science, you need to install Python and some required libraries. Here are the steps to follow:</p><h4>Step 1: Download and Install Python</h4><p>Go to the <a href="https://www.python.org/downloads/">Python website</a> and download the latest version of Python. Follow the installation instructions to install Python on your computer.</p><h4>Step 2: Install Required Libraries</h4><p>There are several libraries that you need to install to work with data in Python. The most commonly used libraries are NumPy, Pandas, Matplotlib, and Scikit-learn. You can install these libraries using the following command in your terminal or command prompt:</p><pre>pip install numpy pandas matplotlib scikit-learn</pre><p>Alternatively, you can use Anaconda, which is a popular data science platform that comes with Python and all the required libraries pre-installed.</p><h3>Running Python Code in Jupyter Notebook</h3><p>Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. It is a great tool for data scientists to write and share their work. Here are the steps to follow to run Python code in Jupyter Notebook:</p><h4>Step 1: Install Jupyter Notebook</h4><p>You can install Jupyter Notebook using the following command in your terminal or command prompt:</p><pre>pip install jupyter</pre><h4>Step 2: Launch Jupyter Notebook</h4><p>Open your terminal or command prompt and type the following command:</p><pre>jupyter notebook</pre><p>This will launch the Jupyter Notebook in your default web browser.</p><h4>Step 3: Create a New Notebook</h4><p>Click on the “New” button on the top right corner and select “Python 3” to create a new notebook.</p><h4>Step 4: Write and Run Python Code</h4><p>You can now write and run Python code in the notebook. To run a code cell, click on the cell and press “Shift + Enter”. The output of the code will appear below the cell.</p><h3>Conclusion</h3><p>In this tutorial, we provided an overview of data science and Python, guided you through the process of installing Python and required libraries, and demonstrated how to run Python code in Jupyter Notebook. In the next tutorial, we will discuss about Python basics.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31b1004693d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using ChatGPT as a Coding Assistant]]></title>
            <link>https://medium.com/@serawork/using-chatgpt-as-a-coding-assistant-23a23f8e3ee4?source=rss-1800e311436b------2</link>
            <guid isPermaLink="false">https://medium.com/p/23a23f8e3ee4</guid>
            <dc:creator><![CDATA[Serawork Wallelign]]></dc:creator>
            <pubDate>Thu, 23 Feb 2023 11:32:46 GMT</pubDate>
            <atom:updated>2023-02-23T13:37:44.379Z</atom:updated>
            <content:encoded><![CDATA[<p>ChatGPT as a coding assistant from planning to debugging.</p><p>As developers, we spend a significant amount of time writing code. The process can be tedious and time-consuming, especially when we encounter roadblocks. In this article, we explore the potential of using ChatGPT, a large language model trained by <a href="https://openai.com/">OpenAI</a>, as a coding assistant to help streamline the coding process.</p><h3>What is ChatGPT?</h3><p>ChatGPT is a state-of-the-art language model that uses deep learning techniques to generate human-like responses to text prompts. It has been trained on a massive amount of data and is capable of generating text that is coherent, grammatically correct, and semantically meaningful. ChatGPT made its debut as a prototype on <em>November 30, 2022,</em> and swiftly gained recognition for its comprehensive and eloquent responses spanning a wide range of knowledge domains. Since its release, <a href="https://lifesmartly.com/uses-of-chatgpt-the-future-of-ai-powered-communication/">ChatGPT has been utilized for diverse purposes</a> ranging from educational to emotional support.</p><h3>How can ChatGPT be used as a coding assistant?</h3><p>ChatGPT can be used as a coding assistant in a variety of ways.</p><ul><li>It can help with auto-completion and suggest code snippets based on the context of what the developer is working on.</li><li>It can provide answers to programming-related questions and offering suggestions for troubleshooting code.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*JimGsNAqAXX3xJ4g0u80yQ.png" /><figcaption>ChatGPT helping with errors</figcaption></figure><ul><li>It can assist with tasks such as identifying syntax errors, suggesting improvements to code structure and logic, and recommending relevant resources for further learning.</li><li>It can also serve as a helpful tool for debugging and testing code, by offering insights into potential issues and suggesting solutions.</li></ul><h3>Limitations of using ChatGPT as a coding assistant</h3><p>While using ChatGPT as a coding assistant has many advantages, there are also some limitations to consider. ChatGPT may not always provide the optimal solution and may require additional human intervention to refine the suggestions. Additionally, it may struggle with more complex coding tasks that require a deep understanding of the underlying logic.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23a23f8e3ee4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>