<?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 Etietop Abraham on Medium]]></title>
        <description><![CDATA[Stories by Etietop Abraham on Medium]]></description>
        <link>https://medium.com/@etietopabraham?source=rss-6bc83aaeda5a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*hA5RmacURZI9cmQzlzQUNA.jpeg</url>
            <title>Stories by Etietop Abraham on Medium</title>
            <link>https://medium.com/@etietopabraham?source=rss-6bc83aaeda5a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 15:05:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@etietopabraham/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[CSVToParquetLoader Orchestrator (Pandas > Spark > HDFS)]]></title>
            <link>https://etietopabraham.medium.com/csvtoparquetloader-orchestrator-pandas-spark-hdfs-6b6d4b5db614?source=rss-6bc83aaeda5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b6d4b5db614</guid>
            <category><![CDATA[csv-to-parquet]]></category>
            <category><![CDATA[big-data-transformation]]></category>
            <category><![CDATA[data-transformation]]></category>
            <dc:creator><![CDATA[Etietop Abraham]]></dc:creator>
            <pubDate>Tue, 07 Nov 2023 19:33:43 GMT</pubDate>
            <atom:updated>2023-11-07T19:33:43.320Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wb6LTPxkZ3Xjl06obHtsQg.png" /></figure><pre>def resume_orchestration(self, start_from):<br>        &quot;&quot;&quot;<br>        Resume the orchestration process from the given start point.<br>        &quot;&quot;&quot;<br>        self.orchestrate(start_from=start_from)</pre><p>In a realm of data vast and wide, Where rows and columns in files reside. There lies a script, both deft and clever, To transform and load, ceasing never.</p><p>It starts with Spark, a trusty steed, A session set to meet our need, With memory fine and cores so steady, For tasks at hand, it stands ready.</p><pre>from pyspark.sql import SparkSession<br>spark = (SparkSession.builder<br>             .appName(&quot;scalables&quot;)<br>             .config(&quot;spark.executor.memory&quot;, &quot;8g&quot;)  # Memory per executor<br>             .config(&quot;spark.executor.memoryOverhead&quot;, &quot;1g&quot;)  # Additional overhead<br>             .config(&quot;spark.memory.fraction&quot;, &quot;0.4&quot;)  # Fraction of heap space used for execution and storage<br>             .config(&quot;spark.memory.storageFraction&quot;, &quot;0.6&quot;)  # Fraction of memory used for storage (caching)<br>             .config(&quot;spark.driver.memory&quot;, &quot;8g&quot;)  # Memory for Spark driver<br>             .getOrCreate())</pre><p>CSVToParquetLoader is its name, Converting files, its claim to fame. From CSV format to Parquet&#39;s embrace, It moves each row, a delicate race.</p><p>A constructor first, with parameters clear, Paths and names that we hold dear, The chunksize small, the rows so many, It’s set to work without a penny.</p><pre>def __init__(self, spark_session, input_path, output_path, filename, chunksize, total_rows, start_row=1):<br>        &quot;&quot;&quot;<br>        Initializes the CSVToParquetLoader with the necessary parameters.<br>        &quot;&quot;&quot;<br>        self.spark = spark_session<br>        self.input_path = input_path<br>        self.output_path = output_path<br>        self.filename = filename<br>        self.chunksize = chunksize<br>        self.total_rows = total_rows<br>        self.start_row = start_row</pre><pre># Example usage: 300 parquets<br><br>loader = LoadData(spark_session=spark,<br>                            input_path=&quot;path/to/input/data/&quot;,<br>                            output_path=&quot;hdfs:///path/to/output/data/&quot;,<br>                            filename=&quot;input_file_name.csv&quot;,<br>                            chunksize=10000,<br>                            total_rows=3000000)<br><br></pre><p>The load_csv method takes its part, Reading chunks, it&#39;s quite the art. With progress bar that marches on, Until the file is good and gone.</p><p>True and False, to ones and zeros turn, In pandas’ land, where DataFrames churn. Concatenation then takes the stage, As chunks unite in a single page.</p><pre>def load_csv(self, skiprows, n_rows=None):<br>        &quot;&quot;&quot;<br>        Loads a chunk of the CSV file into a pandas DataFrame, skipping the header after the first chunk.<br><br>        :param skiprows: Number of rows to skip from the start of the file for this chunk.<br>        :param n_rows: Number of rows to read. Reads till the end if None.<br>        :return: pandas DataFrame containing the chunk.<br>        &quot;&quot;&quot;<br>        # Read in the first row to get the column names<br>        names = pd.read_csv(os.path.join(self.input_path, self.filename), nrows=0).columns.tolist()<br><br>        # Calculate the remaining rows if n_rows is not specified<br>        if n_rows is None:<br>            n_rows = self.total_rows - skiprows + 1<br><br>        # Initialize a tqdm progress bar<br>        pbar = tqdm(total=math.ceil(n_rows / self.chunksize), desc=&#39;Loading CSV&#39;)<br><br>        # Initialize an empty DataFrame<br>        data = pd.DataFrame(columns=names)<br><br>        # Set the header flag depending on whether this is the first chunk or not<br>        header_flag = None if skiprows == 0 else 0<br><br>        # Read the file in chunks<br>        for chunk in pd.read_csv(os.path.join(self.input_path, self.filename), chunksize=self.chunksize,<br>                                 skiprows=range(1, skiprows) if skiprows else None, nrows=n_rows,<br>                                 names=names, header=header_flag):<br>            # Replace True/False with 1/0<br>            chunk.replace([True, False], [1, 0], inplace=True)<br>            # Append the chunk to the data DataFrame<br>            data = pd.concat([data, chunk], ignore_index=True)<br>            # Update the progress bar<br>            pbar.update(1)<br><br>        # Close the progress bar<br>        pbar.close()<br>        return data</pre><p>And once the DataFrame is full and primed, write_to_hdfs takes its time. To Spark&#39;s domain, the data goes, Partitioned, where the fast wind blows.</p><pre>def write_to_hdfs(self, df, partition):<br>        &quot;&quot;&quot;<br>        Writes the given pandas DataFrame to HDFS as a Parquet file.<br><br>        :param df: pandas DataFrame to write.<br>        :param partition: Partition number to append to the file name.<br>        &quot;&quot;&quot;<br>        # Convert pandas DataFrame to Spark DataFrame<br>        df_spark = self.spark.createDataFrame(df)<br>        # Write to HDFS without repartitioning<br>        df_spark.write.mode(&#39;overwrite&#39;).parquet(os.path.join(self.output_path, f&#39;raw_data_{partition}.parquet&#39;))</pre><p>Now written down in HDFS’s keep, In Parquet form, compressed and deep. The orchestrate method, a conductor grand, Guides the process with a gentle hand.</p><pre>def orchestrate(self, start_from=1):<br>        &quot;&quot;&quot;<br>        Coordinates the entire process of reading, converting, and writing data.<br><br>        :param start_from: Partition number to start the process from.<br>        &quot;&quot;&quot;<br>        for i in range(start_from, self.total_rows, self.chunksize):<br>            # Calculate the number of rows to read for the last chunk<br>            n_rows = self.chunksize if i + self.chunksize &lt;= self.total_rows else self.total_rows - i + 1<br>            # Load CSV chunk<br>            df = self.load_csv(i, n_rows=n_rows)<br>            # Write to HDFS<br>            self.write_to_hdfs(df, partition=math.ceil(i / self.chunksize))</pre><p>It slices the file into pieces so neat, Each a part of the total feat. And should an interruption come to pass, resume_orchestration saves your class.</p><p>It picks up where the work was left, Of no momentum are you bereft. From part two-eight-two or wherever you are, It carries on, near or far.</p><pre>def resume_orchestration(self, start_from):<br>        &quot;&quot;&quot;<br>        Resume the orchestration process from the given start point.<br>        &quot;&quot;&quot;<br>        self.orchestrate(start_from=start_from)</pre><p>So behold the class with a task so pure, Turning CSVs to Parquets with allure. A dance of data, a symphony of files, CSVToParquetLoader does it with styles.</p><p>Now outside this class, should you seek to explore, The Parquet files, a treasure trove’s core. read_multiple_parquets_to_df, an open door, To stitch together what was once tore.</p><pre>def read_multiple_parquets_to_df(spark_session, file_pattern):<br>    &quot;&quot;&quot;<br>    Read multiple Parquet files matching a pattern into a single DataFrame.<br><br>    :param spark_session: The Spark session object.<br>    :param file_pattern: The pattern to match files in HDFS.<br>    :return: A DataFrame containing the data from all Parquet files matching the pattern.<br>    &quot;&quot;&quot;<br>    # Read all Parquet files matching the file pattern into a single DataFrame<br>    df = spark_session.read.parquet(file_pattern)<br>    <br>    return df</pre><p>With spark_session and pattern in hand, The files are read as if by command. A DataFrame returns, from the data&#39;s strand, Combined and ready, as your analysis planned.</p><p>So with this tale, the journey ends, But with the knowledge, your path extends. From CSVs to Parquets, the data transcends, And with Spark’s might, your will it bends.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b6d4b5db614" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Step-by-Step Guide to Random Variables: The Long Jump Tournament Tutorial]]></title>
            <link>https://etietopabraham.medium.com/a-step-by-step-guide-to-random-variables-the-long-jump-tournament-tutorial-c994e76a7b5c?source=rss-6bc83aaeda5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/c994e76a7b5c</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[standard-deviation]]></category>
            <category><![CDATA[expected-value]]></category>
            <category><![CDATA[covariance]]></category>
            <category><![CDATA[random-variable]]></category>
            <dc:creator><![CDATA[Etietop Abraham]]></dc:creator>
            <pubDate>Thu, 30 Mar 2023 08:01:51 GMT</pubDate>
            <atom:updated>2023-03-30T08:01:51.733Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WtL--jlDWR8rmoBs" /><figcaption>Photo by <a href="https://unsplash.com/@paul_wong?utm_source=medium&amp;utm_medium=referral">Paul Wong</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Welcome to our intuitive guide to random variables, inspired by the story of the long jump tournament. In this tutorial, we will walk you through the steps to understand and analyze the relationship between two random variables, using the examples from the long jump tournament. Let’s dive in!</p><blockquote><strong>Step 1: Define Random Variables and Joint Probability Distribution</strong></blockquote><p>In the long jump tournament, we have two random variables:</p><ol><li>ε — the participant’s height</li><li>n — the jump length</li></ol><p>We will use a table of joint probability distribution to represent the probabilities of different combinations of heights and jump lengths. The table will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*8qV7Q_PcTxzN3AhRKAk2Kw.png" /></figure><blockquote><strong>Step 2: Find the Marginal Probability Distribution</strong></blockquote><p>To analyze the individual characteristics of the two random variables, we need to find the marginal probability distributions for both ε and n. To do this, add up the probabilities across all jump lengths for each height and across all heights for each jump length.</p><p>For ε: P(ε = 164) = 0.03 + 0.11 = <strong>0.14</strong></p><p>P(ε = 176) = 0.08 + 0.16 = <strong>0.24</strong></p><p>P(ε = 190) = 0.14 + 0.08 = <strong>0.22</strong></p><p>P(ε = 198) = 0.14 + 0.26 = <strong>0.40</strong></p><p>For n: P(n = 4) = 0.03 + 0.08 + 0.14 + 0.14<strong> </strong>=<strong> 0.39</strong></p><p>P(n = 5) = 0.11 + 0.16 + 0.08 + 0.26 = <strong>0.61</strong></p><blockquote><strong>Step 3: Calculate Expected Values</strong></blockquote><p>The expected value represents the “average” value for each random variable. To calculate the expected value, multiply each value of the random variable by its corresponding probability and sum up the results.</p><p>For ε: E(ε) = (164 * 0.14) + (176 * 0.24) + (190 * 0.22) + (198 * 0.40) = 186.2</p><p>For n: E(n) = (4 * 0.39) + (5 * 0.61) = 4.61</p><blockquote><strong>Step 4: Calculate Variance</strong></blockquote><p>The variance measures the spread of the data. To find the variance of the random variables, calculate the expected value of the squared random variable (E(ε²) or E(n²)) and subtract the square of the expected value (E(ε)² or E(n)²).</p><p>For ε: Var(ε) = E(ε²) — (E(ε))² = 34823.28–34652.84 = 152.84</p><p>For n: Var(n) = E(n²) — (E(n))² = 21.49–21.2521 = 0.2379</p><blockquote><strong>Step 5: Calculate Covariance</strong></blockquote><p>To measure the degree to which the two random variables move together, we need to calculate the covariance. To do this, first find the expected value of their product E(εn), and then use the formula: Cov(ε, n) = E(εn) — E(ε)E(n).</p><p>Cov(ε, n) = E(εn) — E(ε)E(n) = 857.68 — (186.2 * 4.61) = 857.68–858.382 = -0.702</p><blockquote><strong>Step 6: Calculate the Correlation Coefficient</strong></blockquote><p>The correlation coefficient is a standardized measure of the relationship between the two random variables. To calculate the correlation coefficient ρ(ε, n), use the following formula:</p><p>ρ(ε, n) = Cov(ε, n) / (σ(ε) * σ(n))</p><p>where σ(ε) and σ(n) are the standard deviations of ε and n, respectively.</p><p>First, calculate the standard deviations of ε and n:</p><p>σ(ε) = sqrt(Var(ε)) = sqrt(152.84) ≈ 12.36 σ(n) = sqrt(Var(n)) = sqrt(0.2379) ≈ 0.488</p><p>Now, calculate the correlation coefficient ρ(ε, n):</p><p>ρ(ε, n) = -0.702 / (12.36 * 0.488) ρ(ε, n) = -0.702 / 6.032 ρ(ε, n) ≈ -0.116</p><h3><strong>Conclusion</strong></h3><p>In this tutorial, we explored the fascinating world of random variables using the example of a long jump tournament. By going through each step, we gained insights into the individual characteristics of the random variables (height and jump length), as well as their relationship.</p><p>We calculated the expected values, variance, covariance, and correlation coefficient to better understand the data. This tutorial demonstrated the power and usefulness of mathematical tools in analyzing real-world scenarios.</p><p>Now that you’ve learned how to work with random variables, you can apply these techniques to other situations in your life, whether it’s sports, finance, or any other field where you need to analyze the relationship between different variables. Happy analyzing, and thank you for your attention.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c994e76a7b5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Installing and Running OpenMP with Python on macOS]]></title>
            <link>https://etietopabraham.medium.com/installing-and-running-openmp-with-python-on-macos-15c57a4cbd4b?source=rss-6bc83aaeda5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/15c57a4cbd4b</guid>
            <category><![CDATA[mpi4py]]></category>
            <category><![CDATA[openmp]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[parallel-processing]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Etietop Abraham]]></dc:creator>
            <pubDate>Wed, 15 Mar 2023 20:39:18 GMT</pubDate>
            <atom:updated>2023-03-15T20:50:08.753Z</atom:updated>
            <content:encoded><![CDATA[<h4>In this tutorial, we will walk you through the process of installing OpenMP (Open Multi-Processing) for Python on macOS, specifically using the mpi4py library. We will also cover how to run a simple host-worker script and troubleshoot common issues encountered during the installation and execution process.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ett_XMaaSA7xQ_ZXISkBlw.png" /><figcaption>etietopdemas from frankincents.ai</figcaption></figure><h3>Requirements:</h3><ul><li>macOS (with M1 or M2 processor)</li><li>Python 3.x installed</li><li>Homebrew package manager installed</li></ul><h4>Steps:</h4><ol><li>Install Open MPI with Homebrew: To use mpi4py, we need to install the Open MPI library first. Open a terminal and run the following command:</li></ol><pre>brew install open-mpi</pre><p>2. Install mpi4py using pip: Once the Open MPI library is installed, you can install the mpi4py library using pip:</p><pre>pip install mpi4py</pre><p>3. Prepare the host-worker script: Create two Python scripts, host.py and worker.py, to demonstrate a simple host-worker communication using mpi4py.</p><p><strong>host.py</strong></p><pre>import sys<br>from mpi4py import MPI as mpi<br><br>if (mpi.COMM_WORLD.Get_size() != 1):<br>    if (mpi.COMM_WORLD.Get_rank() == 1):<br>        print(&quot;Must be only one Host!&quot;)<br>else:<br>    N = 3<br>    comm = mpi.COMM_WORLD.Spawn(sys.executable, args=[&#39;worker.py&#39;], maxprocs=N)<br><br>    for i in range(N):<br>        message = comm.recv()<br>        print(&quot;Rank {}, message: {}&quot;.format(comm.Get_rank(), message))<br><br>    comm.Disconnect()</pre><p><strong>worker.py</strong></p><pre>from mpi4py import MPI as mpi<br><br>comm = mpi.Comm.Get_parent()<br>rank = comm.Get_rank()<br>host = 0<br><br>print(&quot;Host created {} worker!&quot;.format(rank))<br>comm.send(rank, dest=host)<br><br>comm.Disconnect()</pre><p>4. Run the host-worker script: To execute the host-worker script using mpiexec, first, find the path of your Python interpreter using the following command:</p><pre>which python3</pre><p>Now, run the host-worker script using mpiexec:</p><pre>mpiexec -n 1 /path/to/your/python3 host.py</pre><p>Replace /path/to/your/python3 with the path obtained from the which python3 command.</p><p>5. Troubleshooting:</p><p>If you encounter issues during the installation or execution process, review the following tips:</p><ul><li>Make sure you are using the correct Python interpreter path when running mpiexec.</li><li>Ensure that the Open MPI and mpi4py libraries are installed correctly.</li><li>Verify that the host.py and worker.py scripts are placed in the correct directory and have the appropriate file permissions.</li><li>If you encounter issues related to your M1 or M2 processor, try installing the libraries using Homebrew with Rosetta.</li><li>If you encounter the “Error: open-mpi: Failed to download resource ‘gmp_bottle_manifest’” error, try installing Open MPI from source to ensure compatibility with the Apple Silicon processor:</li></ul><pre>brew install --build-from-source open-mpi</pre><ul><li>To make sure mpi4py is installed for the correct Python version, try installing it directly using the Python interpreter you are using:</li></ul><pre>/opt/homebrew/bin/python3 -m pip install mpi4py</pre><ul><li>Configuration issue or firewall blocking communication between MPI processes. During our setup, we encountered an issue where the communication between the host and worker processes was blocked. This problem could have been caused by a configuration issue or a firewall blocking the communication between MPI processes.</li></ul><p>To resolve this, we set the mca parameter as follows:</p><pre>mpiexec -n 1 --mca btl_tcp_if_include lo0 /opt/homebrew/bin/python3 host.py</pre><p>This command includes the loopback interface (lo0) for communication, ensuring that the communication between MPI processes occurs correctly. It’s essential to note that this solution is for a single-node setup where all processes are running on the same machine. If you are working with a multi-node setup, you will need to configure the appropriate network interfaces.</p><p><strong>Conclusion</strong></p><p>In this tutorial, we have demonstrated how to install OpenMP with Python on macOS using the mpi4py library. We also covered how to run a simple host-worker script and troubleshoot common issues. With this knowledge, you can now harness the power of parallel processing in your Python projects!</p><p><strong>Results from host-worker:</strong></p><pre>INFO:root:Host created 2 worker!<br>INFO:root:Host created 0 worker!<br>INFO:root:Host created 1 worker!<br>INFO:root:Rank 0, message: 0<br>INFO:root:Rank 0, message: 2<br>INFO:root:Rank 0, message: 1</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=15c57a4cbd4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Introduction to Parallelism, OpenMP, and Memory Access on macOS M1/M2 on Visual Studio]]></title>
            <link>https://etietopabraham.medium.com/an-introduction-to-parallelism-openmp-and-memory-access-on-macos-m1-m2-on-visual-studio-954b562981a2?source=rss-6bc83aaeda5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/954b562981a2</guid>
            <category><![CDATA[high-performace-computing]]></category>
            <category><![CDATA[multi-core-processing]]></category>
            <category><![CDATA[performance-optimization]]></category>
            <category><![CDATA[openmp]]></category>
            <category><![CDATA[parallel-programming]]></category>
            <dc:creator><![CDATA[Etietop Abraham]]></dc:creator>
            <pubDate>Wed, 15 Mar 2023 12:34:26 GMT</pubDate>
            <atom:updated>2023-03-15T12:34:26.569Z</atom:updated>
            <content:encoded><![CDATA[<p>In this tutorial, we will explore the concept of parallelism in computing and learn how to use the OpenMP library to parallelize a simple C program on macOS M1/M2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*U1b7pfRov4li5O5i" /><figcaption>Photo by <a href="https://unsplash.com/@faraixyz?utm_source=medium&amp;utm_medium=referral">Farai Gandiya</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>We will cover the following,</h4><ol><li>Introduction to parallelism</li><li>Computational complexity of parallelized transformer networks</li><li>Flynn’s Taxonomy and its relationship to parallelization</li><li>Systematization by access to memory (shared, distributed, and CUDA)</li><li>OpenMP basics</li><li>Installing OpenMP on macOS with M1/M2 processors</li><li>Adding Homebrew to PATH</li><li>Updating LDFLAGS &amp; CPPFLAGS environment</li><li>Configuring Visual Studio Code for OpenMP</li><li>A simple OpenMP example</li><li>Compiling and running the OpenMP program</li></ol><h3>1. Introduction to Parallelism</h3><p>Parallelism in computing refers to the execution of multiple tasks concurrently, using multiple processing units or cores. Parallelization can help speed up computationally-intensive tasks by dividing the workload among multiple processors, leading to faster execution times and increased performance.</p><h3>2. Computational Complexity of Parallelized Transformer Networks</h3><p>Transformer networks can be parallelized effectively due to their self-attention mechanism and layer-wise structure. The computational complexity of transformers is mainly determined by the matrix multiplications in the self-attention mechanism. By parallelizing these operations across multiple GPUs or other hardware accelerators, the overall training and inference times can be significantly reduced.</p><h3>3. Flynn’s Taxonomy and Its Relationship to Parallelization</h3><p>Flynn’s Taxonomy is a classification system for computer architectures based on the number of instruction streams and data streams. It defines four categories:</p><ol><li>SISD (Single Instruction, Single Data): A single instruction operates on a single data stream, e.g., traditional sequential CPUs.</li><li>SIMD (Single Instruction, Multiple Data): A single instruction operates on multiple data streams simultaneously, e.g., vector processors and GPU shader cores.</li><li>MISD (Multiple Instruction, Single Data): Multiple instructions operate on a single data stream, e.g., fault-tolerant systems.</li><li>MIMD (Multiple Instruction, Multiple Data): Multiple instructions operate on multiple data streams, e.g., multi-core CPUs and distributed systems.</li></ol><p>Parallelization techniques like those used in transformer networks primarily focus on the SIMD and MIMD categories, allowing developers to parallelize code across multiple cores or processors.</p><h3>4. Systematization by Access to Memory (Shared, Distributed, and CUDA)</h3><p>There are three main ways to organize memory access in parallel computing systems:</p><ol><li>Shared memory: All processing units have access to a single shared memory space. Communication between processing units is done through memory reads and writes. OpenMP is an example of a shared memory programming model.</li><li>Distributed memory: Each processing unit has its own local memory, and communication between processing units is done via message passing. MPI (Message Passing Interface) is an example of a distributed memory programming model.</li><li>CUDA: Compute Unified Device Architecture (CUDA) is a parallel computing platform and programming model developed by NVIDIA. It allows developers to use NVIDIA GPUs for general-purpose computing tasks. CUDA combines elements of both shared and distributed memory models and provides additional abstractions for GPU programming.</li></ol><p>Now let’s get to the fun part!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ERn-xc6QVoVlasJ5.png" /><figcaption>Generated on <a href="https://frankincents.ai/">https://frankincents.ai/</a> by Etietop Demas Abraham</figcaption></figure><h3>5. OpenMP Basics</h3><p>OpenMP (Open Multi-Processing) is an API for writing parallel applications in C, C++, and Fortran. It is designed for shared-memory multi-processor systems and provides a simple and flexible way to parallelize code using compiler directives, library routines, and environment variables</p><h4>Basic Constructs of OpenMP</h4><p>Here are some of the basic constructs of OpenMP:</p><ol><li>Directives: OpenMP uses directives, which are typically written as pragmas in C and C++. These pragmas provide instructions to the compiler to parallelize specific parts of the code.</li></ol><p>Example: Parallelizing a simple for loop: #pragma omp parallel for</p><pre>#pragma omp parallel for<br>for (int i = 0; i &lt; N; i++) {<br>    // Perform some operation<br>}</pre><p>2. Parallel Regions: A parallel region is a block of code that can be executed by multiple threads concurrently. You can create a parallel region using the #pragma omp parallel directive.</p><pre>#pragma omp parallel<br>{<br>    // Code inside this block will be executed in parallel by multiple threads<br>}</pre><p>3. Thread Management: OpenMP provides various mechanisms for managing and synchronizing threads, such as specifying the number of threads and setting thread affinity. Example: Setting the number of threads:</p><pre>omp_set_num_threads(4); // Set the number of threads to 4</pre><p>4. Synchronization: OpenMP provides synchronization constructs like barriers, critical sections, and atomic operations to ensure the proper execution order of operations within parallel regions.</p><p>Example: Using a critical section to protect a shared resource:</p><pre>#pragma omp critical<br>{<br>    // Code inside this block will be executed by one thread at a time<br>}</pre><p>5. Reduction: Reduction is a common operation in parallel computing where the result of an operation is accumulated across multiple threads. OpenMP provides a reduction clause to simplify the process.</p><p>Example: Summing the elements of an array using reduction:</p><pre>int sum = 0;<br>#pragma omp parallel for reduction(+:sum)<br>for (int i = 0; i &lt; N; i++) {<br>    sum += array[i];<br>}</pre><h3>6. Installing OpenMP on macOS with M1/M2 Processors</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zKfmH-PM_oWx4F5Q" /><figcaption>Photo by <a href="https://unsplash.com/@latorware?utm_source=medium&amp;utm_medium=referral">david latorre romero</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>To use OpenMP on macOS with M1/M2 processors, you need to install the LLVM OpenMP runtime library (libomp) using Homebrew, a package manager for macOS:</p><ol><li>Install Homebrew by following the instructions on the <a href="https://brew.sh/">official Homebrew website</a>.</li><li>Install libomp by running the following command in the terminal:</li></ol><pre>brew install libomp</pre><h3>7. Adding Homebrew to PATH</h3><p>After installing Homebrew, you need to add it to your PATH to access the installed tools easily. Run the following commands in your terminal:</p><pre>echo &#39;eval &quot;$(/opt/homebrew/bin/brew shellenv)&quot;&#39; &gt;&gt; /Users/macbookpro/.zprofile<br>eval &quot;$(/opt/homebrew/bin/brew shellenv)&quot;</pre><p>These commands add the Homebrew bin directory to your PATH, making it easier to use the installed tools directly from the terminal.</p><h3>8. Updating LDFLAGS &amp; CPPFLAGS Environment</h3><p>When you install libomp, you may receive a message suggesting you update your LDFLAGS and CPPFLAGS environment variables. This is necessary for the compiler to find the OpenMP library and include files. Add the following lines to your shell configuration file (e.g., .zshrc or .bashrc):</p><pre>export LDFLAGS=&quot;-L/opt/homebrew/opt/libomp/lib&quot;<br>export CPPFLAGS=&quot;-I/opt/homebrew/opt/libomp/include&quot;</pre><p>After adding these lines, restart your terminal or run source ~/.zshrc or source ~/.bashrc to apply the changes.</p><h3>9. Configuring Visual Studio Code for OpenMP</h3><p>To use OpenMP with Visual Studio Code, you need to update the include path settings:</p><ol><li>Open Visual Studio Code and go to Settings.</li><li>Search for “c_cpp” in the search bar.</li><li>Under “C/C++: IntelliSense Configurations”, click on “Edit in settings.json”.</li><li>Add the following lines to the settings.json file:</li></ol><pre>&quot;C_Cpp.default.includePath&quot;: [<br>    &quot;/opt/homebrew/opt/libomp/include&quot;<br>]</pre><p>5. Save the file and restart Visual Studio Code.</p><h3>10. A Simple OpenMP Example</h3><p>Here’s a simple example of an OpenMP program in C that demonstrates the basics of parallelization using OpenMP:</p><pre>#include &lt;stdio.h&gt;<br>#include &lt;omp.h&gt;<br><br>int main() {<br>    int i, sum = 0;<br>    int array_size = 100;<br>    int array[array_size];<br><br>    // Initialize the array with values<br>    for (i = 0; i &lt; array_size; i++) {<br>        array[i] = i + 1;<br>    }<br><br>    // Calculate the sum using OpenMP<br>    #pragma omp parallel for reduction(+:sum)<br>    for (i = 0; i &lt; array_size; i++) {<br>        sum += array[i];<br>    }<br><br>    printf(&quot;The sum of the array elements is: %d\n&quot;, sum);<br>    return 0;<br>}</pre><p>This example initializes an array and calculates the sum of its elements using a parallelized for loop with a reduction operation.</p><h3>11. Compiling and Running the OpenMP Program</h3><p>To compile and run the OpenMP program, follow these steps:</p><ol><li>Save the example code in a file called test.c.</li><li>Open a terminal and navigate to the directory where test.c is saved.</li><li>Compile the program using the following command:</li></ol><pre>clang -Xpreprocessor -fopenmp -lomp test.c -o your_output_executable</pre><p>4. Run the compiled program with the following command:</p><pre>./your_output_executable</pre><p>The program should output the sum of the array elements, demonstrating that the OpenMP parallelization is working correctly.</p><p>Thank you for your attention.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=954b562981a2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond the Past and Present: Integrating the Potential for Individual and Societal Growth and…]]></title>
            <link>https://etietopabraham.medium.com/beyond-the-past-and-present-integrating-the-potential-for-individual-and-societal-growth-and-92bf018bcc8?source=rss-6bc83aaeda5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/92bf018bcc8</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai-ethics]]></category>
            <category><![CDATA[data-bias]]></category>
            <category><![CDATA[fairness]]></category>
            <category><![CDATA[transparency]]></category>
            <dc:creator><![CDATA[Etietop Abraham]]></dc:creator>
            <pubDate>Sat, 18 Feb 2023 18:23:31 GMT</pubDate>
            <atom:updated>2023-02-18T18:23:31.290Z</atom:updated>
            <content:encoded><![CDATA[<h2>Beyond the Past and Present: Integrating the Potential for Individual and Societal Growth and Progress in Machine Learning</h2><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yK5MTvvkSgt_Ltbx.png" /><figcaption>Generated on <a href="https://frankincents.ai/">https://Frankincents.ai</a> with prompt machines and human bias by <a href="https://medium.com/u/6bc83aaeda5a">Etietop Abraham</a></figcaption></figure><p>As a software engineer, I have primarily worked on frontend and backend development and integrations. However, my recent experience working with data structures and algorithms has caused me to become more aware of the “black box” nature and the potential for bias within machine learning systems. While past data can help predict future trends, I believe that we should also consider the potential for growth and development to be a weighted consideration in our models to achieve a more humanistic and progressive society, rather than solely relying on past and present information.</p><p>For example, in the context of hiring, a model that takes into account an individual’s potential for growth and development, along with their past experiences, can be more effective in predicting success in a role than a model that only relies on past experience. Such a model could evaluate candidates based on their soft skills, personality traits, and demonstrated willingness to learn and adapt to new challenges. Additionally, the model could account for external factors, such as access to training and support, that could help unlock an individual’s potential.</p><p>Thankfully, there are many voices pushing for regulation in the realm of machine learning, people like Catherine (“Cathy”) Helen O’Neil with her Weapons of Math Destruction, Joy Buolamwini with her beautiful poet of code, Big Brother Watch in the UK, Timnit Gebru, Kate Crawford, Tim O’Reilly, Andrew Ng and a host of more brave people, which is encouraging. To ensure fairness and equality in these systems, we must take a proactive approach. This includes collecting diverse data, regularly auditing the models for bias, providing transparency, implementing human oversight, testing for fairness and bias, and involving minority groups in the design and testing process.</p><p>By committing to these efforts, we can create a better future for all. If you’ve not seen the documentary; Coded Bias on Netflix, check it out.</p><p>#MachineLearning #Fairness #Transparency #AIethics #DataBias #DiversityInTech #TechRegulation #HumanisticTechnology #TechProgress #SocialJustice</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92bf018bcc8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Infinite Journey of Alice: Exploring the Boundless Mysteries of the Universe]]></title>
            <link>https://etietopabraham.medium.com/the-infinite-journey-of-alice-exploring-the-boundless-mysteries-of-the-universe-1aacd58c6007?source=rss-6bc83aaeda5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1aacd58c6007</guid>
            <dc:creator><![CDATA[Etietop Abraham]]></dc:creator>
            <pubDate>Mon, 06 Feb 2023 23:01:55 GMT</pubDate>
            <atom:updated>2023-02-06T23:01:55.456Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uYwMeo7Vau_H4a3L" /><figcaption>DALL.E: king fisher bird looking to the universe and wondering about infinity and the human brain</figcaption></figure><p>Once upon a time, there was a curious person named Alice who loved to ask questions about the world and the universe. One day, she stumbled upon an advanced artificial intelligence named ChatGPT and asked it about the concept of infinity.</p><p>ChatGPT explained to Alice that infinity is a concept used to describe objects or quantities that are unbounded and unlimited, without any end or limit. It also told Alice that the current understanding of the universe is that it is most likely infinite in size and constantly expanding.</p><p>However, this answer only sparked more questions in Alice’s mind. She asked ChatGPT about the structure of the brain, and how it compared to the structure of the universe. ChatGPT told Alice that the brain, with its billions of neurons and trillions of connections, is a complex system that gives rise to our thoughts and experiences, while the universe, with its countless stars and galaxies, is a complex system held together by gravity and other physical forces.</p><p>This led Alice to wonder if the universe might actually be finite after all. ChatGPT explained that while the current evidence suggests that the universe is infinite and expanding, it is still an open question and more research is needed to determine its size and structure definitively.</p><p>Alice was fascinated by this conversation and couldn’t stop thinking about the infinite possibilities of the universe. She decided to dedicate her life to exploring these mysteries and uncovering the secrets of the universe. And so, she became a scientist, constantly searching for answers and asking new questions, determined to unravel the mysteries of the universe and the infinite possibilities it holds.</p><p>#Infinity #Universe #Brain #Science #Cosmology #Philosophy #Mystery #Exploration #Questions #Answers #AI #ChatGPT #Journey #Curiosity #Structure #Galaxies #Stars #Gravity #Thoughts #Experiences #Discoveries #Research</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1aacd58c6007" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Diversity, Equity and Inclusion: The Key to Unleashing Business Growth]]></title>
            <link>https://etietopabraham.medium.com/diversity-equity-and-inclusion-the-key-to-unleashing-business-growth-f65153cbc14?source=rss-6bc83aaeda5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f65153cbc14</guid>
            <category><![CDATA[diversity]]></category>
            <category><![CDATA[business-growth]]></category>
            <category><![CDATA[inclusion]]></category>
            <category><![CDATA[equity]]></category>
            <dc:creator><![CDATA[Etietop Abraham]]></dc:creator>
            <pubDate>Thu, 26 Jan 2023 21:38:54 GMT</pubDate>
            <atom:updated>2023-01-26T21:38:54.119Z</atom:updated>
            <content:encoded><![CDATA[<p>Diversity, equity, and inclusion (DEI) are becoming increasingly important in today’s business world. Not only is it the right thing to do, but it can also lead to significant growth for any organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g85BSZBX-QMb6pbwtqAxTQ.png" /><figcaption>Diversity, Equity and Inclusion: The Key to Unleashing Business Growth</figcaption></figure><p>One of the main reasons why DEI is crucial for growth is the diverse experiences and perspectives that it brings to the table. When an organization has a diverse team, it is able to tap into a wider range of ideas and perspectives, which can lead to more innovative solutions and better decision-making.</p><p>For example, a team that is made up of individuals from different backgrounds and cultures is more likely to come up with new and creative ideas that can be used to solve problems and meet the needs of a diverse customer base. A team that is more diverse is also more likely to identify and understand the needs of different groups of people, which can lead to new products, services, or marketing strategies that can help the organization to grow.</p><p>Additionally, a diverse team can also help an organization to better understand the different markets and customers that it serves. This knowledge can be used to develop more effective marketing strategies and to create products and services that are better suited to the needs of different groups of people.</p><p>Another key benefit of DEI is that it can help to attract and retain top talent. In today’s highly competitive job market, many of the most talented and skilled individuals are looking for organizations that are committed to DEI and that are committed to making a positive impact on the world. By creating a culture of diversity, equity, and inclusion, an organization can attract the best and brightest minds, which can lead to increased productivity and improved performance.</p><p>Finally, DEI can also lead to increased employee engagement and satisfaction. When individuals feel that they are valued and respected, they are more likely to be engaged and motivated to do their best work. This can lead to increased productivity and improved performance, which can ultimately help to drive the growth of the organization.</p><p>In conclusion, DEI is one of the quickest ways to grow anything because it leads to diverse experiences and perspectives that can lead to new ideas, new markets, and new customers. Not only that, it also helps to attract and retain top talent, increase employee engagement and satisfaction which ultimately drive the growth of the organization. It is not just the right thing to do, but it’s also a smart business decision.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f65153cbc14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Future of Job Roles in the Age of AI: Why Creatives Must Expand Their Skillset]]></title>
            <link>https://etietopabraham.medium.com/the-future-of-job-roles-in-the-age-of-ai-why-creatives-must-expand-their-skillset-ed585a3edead?source=rss-6bc83aaeda5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed585a3edead</guid>
            <category><![CDATA[ai-and-jobs]]></category>
            <category><![CDATA[changing-job-roles]]></category>
            <category><![CDATA[job-roles-evolution]]></category>
            <category><![CDATA[job-evolution]]></category>
            <dc:creator><![CDATA[Etietop Abraham]]></dc:creator>
            <pubDate>Wed, 25 Jan 2023 22:32:45 GMT</pubDate>
            <atom:updated>2023-01-25T22:32:45.125Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i_CkB8F4hqs4uOC0MhFckw.png" /></figure><p>As artificial intelligence (AI) continues to revolutionise the way we work and live, it is also transforming the job market. One area in which this is particularly notable is in the field of creative work. In the past, creatives such as graphic designers, writers, and marketers were primarily responsible for the visual and verbal representation of a business, but with the advent of AI, their role is evolving.</p><p>In order to stay competitive in today’s market, creatives must now have a deep understanding of the businesses they are working with. This means not only being able to create visually appealing and compelling content, but also understanding the underlying business processes, strategies and goals. For example, a developer who specializes in accounting, finance analytics and economics will be able to contribute more than just the presentation of the content, but also the soul of the business.</p><p>This shift towards more specialized and multi-disciplinary roles is driven by the increasing use of AI in business. As AI systems are able to automate more and more tasks, businesses are looking for employees who can bring a unique set of skills and knowledge to the table. This is especially true for creatives, who must now be able to not just create great content, but also understand how it fits into the larger business ecosystem.</p><p>In addition to this, the increasing use of AI in customer service and support roles also means that creatives must also be able to create content that is tailored to specific customer needs and preferences. This requires not just an understanding of the target audience but also an understanding of the AI systems that will be used to deliver the content.</p><p>Overall, the job market is rapidly evolving as a result of AI, and creatives must adapt to stay relevant. This means not just honing their creative skills, but also developing a deep understanding of the businesses they work with, and the technologies that are transforming the industry. The future belongs to those who can bring a unique and valuable perspective to the table, and creatives who can do that will be in high demand.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed585a3edead" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Entangled Dreams]]></title>
            <link>https://etietopabraham.medium.com/entangled-dreams-1e6ab5117e14?source=rss-6bc83aaeda5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e6ab5117e14</guid>
            <category><![CDATA[entangled-dreams]]></category>
            <category><![CDATA[st-isaacs-cathedral]]></category>
            <category><![CDATA[in-whose-dream-am-i]]></category>
            <dc:creator><![CDATA[Etietop Abraham]]></dc:creator>
            <pubDate>Fri, 20 Jan 2023 16:01:33 GMT</pubDate>
            <atom:updated>2023-01-20T16:01:33.538Z</atom:updated>
            <content:encoded><![CDATA[<h4>Entangled Dreams is a topic that has captivated philosophers and thinkers throughout history. The question of “In whose dream am I?” is not only a deep and intriguing one but also a reminder of the complexity of our minds and the intricate web of our desires and realities.</h4><p>Carl Jung’s famous quote, “Who looks outside, dreams; who looks inside, awakes,” highlights the fact that our dreams reveal the inner workings of our unconscious mind, where our desires and realities are entangled. This entanglement raises the question of whether our dreams are truly our own or shaped by a higher power or the desires of others.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iR7jktiMjhrveqvRSoYSog.jpeg" /><figcaption>Behind me is St Isaac’s Cathedral, The Tsar approved the cathedral in classical style. The construction started in 1818, lasted 40 years and the consecration ceremony took place on May 30, 1858, the day of Saint Isaac.</figcaption></figure><p>The ancient Greek philosopher Aristotle believed that finding balance and moderation in our aspirations is essential for achieving true fulfilment. His concept of the “golden mean” highlights the importance of finding the middle ground between excess and deficiency, especially in the context of the entanglement of our dreams. Similarly, Plato’s “Allegory of the Cave” presents the idea that our understanding of reality is limited by our perceptions and experiences. True knowledge, according to Plato, can only be achieved by breaking free from the constraints of our perceptions.</p><p>In conclusion, the entanglement of dreams, visions, and creations raises important questions about the nature of our reality and the role of the Creator. Historical and philosophical perspectives, such as Aristotle’s “golden mean” and Plato’s “Allegory of the Cave,” provide insight into the importance of balance, moderation, and challenging our perceptions and understanding in order to gain a deeper understanding of the entanglement of our dreams. While the question of ‘In whose dream am I?’ may remain a mystery, it is certain that our understanding of our desires and reality is shaped by a multifaceted plethora of observations and the constraints of our experiences.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e6ab5117e14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Designing systems from the grounds up for ‍ restaurant  managers in Lagos, Nigeria —  PART…]]></title>
            <link>https://medium.com/geek-radius/designing-systems-from-the-grounds-up-for-restaurant-managers-in-lagos-nigeria-part-8d0b8b02946a?source=rss-6bc83aaeda5a------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d0b8b02946a</guid>
            <category><![CDATA[restaurant-systems]]></category>
            <category><![CDATA[systems-thinking]]></category>
            <category><![CDATA[cost-analysis]]></category>
            <category><![CDATA[restaurant-management]]></category>
            <dc:creator><![CDATA[Etietop Abraham]]></dc:creator>
            <pubDate>Wed, 16 Mar 2022 08:22:49 GMT</pubDate>
            <atom:updated>2022-03-16T08:22:49.688Z</atom:updated>
            <content:encoded><![CDATA[<h3>Designing systems from the grounds up for 🧑🏿‍🍳 restaurant 🍲 managers in Lagos, Nigeria — PART 1</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*k0WCUiBzBKg_VbH_wSVgAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*aUXJfPuDBX-L2UGCWVdf-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/481/1*4Rd12EQTbi2aKweswAOvxA.png" /><figcaption>From left to right; A plate of Seafood Okra, Mid fidelity UI menu design, &amp; another mid-fidelity UI to edit the menu.</figcaption></figure><h3>Assume you have a functioning kitchen; open to accepting and fulfilling new orders daily, including Sundays.</h3><p>You’ve invested some money, say ₦5,000,000, to cater for important assets like refrigerator, freezer, cooker, utensils, pots, computer, printer, pos hardware, etc. You are prepared to incur a fixed monthly cost to take care of renting a kitchen/dining area (₦300k/month), and take care of operating costs; A head chef (₦250k/month), deputy chef (₦180k/month), junior chef(₦120k/month), kitchen porter (₦100k/month), purchasing manager (₦100k/month), 1 cleaner (₦70k/month), 1 waiter (₦70k/month), electricity &amp; utilities (₦50k/month), online marketing (₦200,000/month)</p><h3>Sunk cost = ₦5,000,000, &amp; Fixed Monthly Costs = ₦1,450,000</h3><blockquote>Sunk cost is not considered when setting prices, it is a cost that can be recovered over time during operation of the business.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*Asn5hdyuqK4RjCOn7Nazyw.png" /><figcaption>Break-down of fixed monthly costs</figcaption></figure><h3>To keep things simple, you only serve Seafood Okra with any choice of swallow; Eba, Amala, Pounded Yam, Wheat, Semo, or Fufu. 😋 Served at your physical restaurant or your online menu.</h3><h3>Now, the question is, how much Seafood Okra can your kitchen produce daily?</h3><h4>Ok, let’s start off with a hundred units of Seafood Okra daily, for 30 days; setting your kitchen production capacity at 3,000 units of Seafood Okra every month.</h4><h4>Now let’s calculate your fixed monthly expenses per unit of Seafood Okra produced by dividing the total fixed monthly cost by total production capacity; 1,450,000/3,000 = 483.33/Unit.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mhB_cLjJE6TnrvJ_pzF2og.png" /><figcaption>Break-down of fixed monthly unit cost</figcaption></figure><p>It’s time for your variable costs, which in this case is mostly the cost of stocking your inventory of ingredients and the cost of transporting these ingredients from your supplier to your kitchen.</p><p>Here’s what the cost of making Seafood okra in Jan 2022 was.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*0sJaQ3t0V4DsH4uFIxnVxA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*BbEEeROHWaca3Qt59M4a7Q.png" /><figcaption>Seafood Okra Ingredient Note</figcaption></figure><p>The total cost of ingredients to serve 6 customers is set at ₦13,000. I.e. ₦2,166.67 per unit sold.</p><p>Transportation via Bolt to and fro the market is ₦3,000, taking care of 6 units, which is at ₦500 per unit. Quite expensive, a better way is to establish supplier relationships that allow your business to purchase more inventory, so as to spread the cost across more units. In this article, we’ll stick to ₦500/unit on transportation.</p><h4>So let’s combine the costs of ingredients, ₦2,166.67 + Transportation, ₦500 = ₦2,666.67.</h4><h3>It’s time for the big picture! To be profitable, what price should you set Seafood Okra at?</h3><h4>To answer this question, we must calculate the average cost of producing a plate of Seafood Okra.</h4><blockquote>Our average cost per unit = Fixed unit cost + Variable unit cost.</blockquote><h3>In this case, we’ve estimated a fixed unit cost of producing 3,000 units of Seafood Okra at ₦483.33, and variable unit costs of supplying ingredients to prepare this meal at ₦2,666.67, totaling ₦3,150/unit as the average cost of production per unit.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OSOP7YUXVH4OSvzecM6NLA.png" /><figcaption>The average cost of producing one unit of Seafood Okra</figcaption></figure><h4>Professor Bharat N. Anand of Harvard University once told me; “Never ever sell below your average cost; don’t waste your time.”</h4><h3>If your restaurant operates at full capacity every day, which is the best-case scenario;</h3><h4>You’ll be selling 3,000 plates of Seafood Okra every month, with an average cost per unit at ₦3,150. Hence, if your selling price is at ₦3,500 per plate, you’ll generate a profit of ₦350/plate, i.e. ₦1,050,000 on 3,000 plates as profit at the end of the month.</h4><h4>Implying that you might have to wait for about 5 months to break even your sunk cost of ₦5,000,000. Your operational margin is set at a margin of 11%.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YsViSVRwYPEJrVf6GxfTOg.png" /><figcaption>Best case scenario profit and break-even</figcaption></figure><h4>In the average-case scenario, your restaurant is able to serve 1500 plates of Seafood Okra every month, in this case, the average cost per unit goes up to ₦3,633.33 per plate. Hence, setting prices at ₦4,000 per plate, making profits of ₦360/plate, i.e. ₦550,000 profit (i.e. 1500 plates * ₦360) at the end of the month. Implying that it will take about 9 months to break even on your 5,000,000 sunk cost. You’re seeing margins at 10%.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rd4X51t93OvNO_1GQT-w_A.png" /><figcaption>Average case scenario profits and break-even</figcaption></figure><h4>Finally, worst-case scenario, I don’t like this case lol. If you fulfill only 25 plates a day, i.e. 750 orders per month, keeping all other costs the same (salaries, marketing, rent, etc), your average cost goes up to ₦4,600 per unit, meaning you’d have to sell at 5,100 per plate to break even in 13 months (God forbid lol). Making ₦500 profits per unit, i.e. ₦375,000 on all 750 orders.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pJBmlmzyD5xzSaADC-Z4Zw.png" /><figcaption>Worst-case scenario profit and break-even</figcaption></figure><h3>In PART 2, I’ll walk you through operational systems I’m designing from the grounds up to help restaurant managers keep an eye on; orders, inventory, CRM, etc.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IjPLGdfbGMmqPZ7Ib5ivnQ.png" /><figcaption>Accounting and profits system for restaurant managers</figcaption></figure><p>Ok, I’m signing out, let me know what you think by leaving a comment. I totally understand that this is a lot to consume, and can only hope that you find it helpful, see you in PART 2 🤗</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7JXwIHP_d5mElAsr8TAdIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w3CEJfxhOilfq7V72BKYLg.jpeg" /><figcaption>🤗🤗🤗🤗🤗🤗</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d0b8b02946a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geek-radius/designing-systems-from-the-grounds-up-for-restaurant-managers-in-lagos-nigeria-part-8d0b8b02946a">Designing systems from the grounds up for 🧑🏿‍🍳 restaurant 🍲 managers in Lagos, Nigeria —  PART…</a> was originally published in <a href="https://medium.com/geek-radius">Geek Radius</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>