<?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 Hilal Koçak on Medium]]></title>
        <description><![CDATA[Stories by Hilal Koçak on Medium]]></description>
        <link>https://medium.com/@hhilalkocak?source=rss-992d994d8f0b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Zz9_-DeFr1q1Ls_ysNDfsQ.png</url>
            <title>Stories by Hilal Koçak on Medium</title>
            <link>https://medium.com/@hhilalkocak?source=rss-992d994d8f0b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 13:10:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hhilalkocak/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[The Evolutionary Multiobjective Optimization Algorithms ⚖️]]></title>
            <link>https://medium.com/@hhilalkocak/the-evolutionary-multiobjective-optimization-algorithms-%EF%B8%8F-e068e1ed0c66?source=rss-992d994d8f0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e068e1ed0c66</guid>
            <category><![CDATA[multi-objective]]></category>
            <category><![CDATA[optimization-algorithms]]></category>
            <category><![CDATA[genetic-algorithm]]></category>
            <dc:creator><![CDATA[Hilal Koçak]]></dc:creator>
            <pubDate>Tue, 31 Dec 2024 11:23:03 GMT</pubDate>
            <atom:updated>2024-12-31T11:23:03.661Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Life is a series of trade-offs; you have to decide which ones you’re willing to make.</em></p><p>When explaining basic optimization algorithms such as the Tabu Search Algorithm, Swarm Optimization Algorithm, or Genetic Algorithm, the focus is generally on a single mathematical model. The objective function (goal or target function) is either maximized or minimized. However, real-world problems are often too complex to focus on a single goal. We may need to optimize two or more objective functions simultaneously.</p><p>When we have multiple objective functions, these functions may or may not share common parameters. In scenarios where we try to optimize one of these functions, it is possible for the other objective functions to deteriorate.</p><p>Below are examples of problems with multiple objective functions:</p><ul><li>Reducing the weight of a car while simultaneously reducing fuel consumption.</li><li>Maximizing product yield while minimizing water usage and fertilizer costs.</li><li>Maximizing treatment effectiveness while minimizing side effects.</li><li>Maximizing investment returns while minimizing risk.</li><li>Minimizing electricity production costs while reducing carbon emissions.</li></ul><p>In scenarios where multiple objective functions are present, these objectives often conflict with each other. In the image below, it can be observed that as one objective function improves, the other objective functions deteriorate.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tF8lFCdfiZK8fQBtElZJCg.png" /></figure><h4><strong>History</strong></h4><ul><li>In the 1960s, genetic algorithms were used solely for the optimization of a single objective.</li><li>In the early 1990s, Multiobjective Evolutionary Optimization Algorithms (MOEA) emerged.</li><li>In 1993, the Vector Evaluated Genetic Algorithm (VEGA), proposed by Schaffer, was recognized as the first genetic algorithm used for multi-objective optimization.</li><li>In 1994, Srinivas and Deb made a significant contribution to the field of multi-objective evolutionary algorithms with the introduction of the Non-dominated Sorting Genetic Algorithm (NSGA).</li></ul><h4>Pareto Optimality and the Concept of Domination</h4><p>x1​ dominates x2 if:</p><ul><li>x1 is not worse than x2 in all objectives, and</li><li>x1 is better than x2 in at least one objective.</li></ul><h4><strong>Non-Dominated Points</strong></h4><p>Non-dominated points are those solutions that are <strong>not dominated</strong> by any other solution in the population. These points collectively form the <strong>Pareto-optimal solutions</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2XCVcDCKPl0SZ5Pf6LRbwg.png" /></figure><p>Looking at the graph:</p><ul><li>3 dominates 2</li><li>3 does not dominate 5</li><li>1 dominates 2</li><li>3, 5, 6 =&gt; Non-dominated points</li></ul><p>Members of a population that are <strong>not dominated</strong> by any other member are referred to as <strong>non-dominated points</strong>. These points collectively form the <strong>Pareto front</strong>, also known as the <strong>non-dominated front</strong>.</p><p>During each iteration of an evolutionary multi-objective optimization (MOEA) algorithm, efforts are made to:</p><ol><li>Improve the <strong>diversity</strong> of solutions within the population to ensure coverage of the Pareto front.</li><li>Move the solutions closer to the <strong>true Pareto front</strong>, optimizing trade-offs among conflicting objectives.</li></ol><p>This iterative process ensures that the population evolves to include high-quality, diverse solutions that approximate the Pareto-optimal front, enabling better decision-making in multi-objective optimization problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/590/1*6H5SEf3icnLBTguRal7X8g.png" /></figure><p><strong><em>Pareto Optimal Set</em></strong><em>:</em> Considering the entire population, all non-dominated solutions form the Pareto-optimal set.<br><strong><em>Complexity</em></strong><em>:</em> O(N log N)<br>In cases where there are more than two objective functions, three-dimensional Pareto fronts emerge, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*THP7Utkzg3a3zxRNZQYAIA.png" /></figure><p>After finding a solution set that is as close as possible to the Pareto front, a decision-maker selects a single solution, as shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T4hjHUH3DAIpBJvIeEjmLQ.png" /></figure><p>To understand the entire process and workflow, refer to the image below. First, a classic Genetic Algorithm (selection, mutation, crossover) is applied to create a child population named Qt from a population containing N individuals. These two populations are then combined to form Rt with a size of 2N. From the resulting 2N-sized population, points dominated by any other points are eliminated, forming the non-dominated solution set.</p><p>Below, F1,F2,…,Fn​ represent the non-dominated solutions. The points on the first-level Pareto front are represented by the F1 set, and the points on the second-level Pareto front are represented by the F2 set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G0vbWs8Hp_nKGTSR1lE-1Q.png" /></figure><p>Non-dominated sorting, that is, filtering out the points that are not dominated by any other points, is followed by measuring the ‘Crowding Distance’ to reduce the 2N-sized population to N. The Crowding Distance measures the amount of empty space around a point (solution), determining how isolated that solution is compared to others. A higher value of this measure is desirable because increasing diversity depends on continuously selecting solutions with distinct characteristics.</p><p>If the Crowding Distance is high, the region around the solution is less crowded. This means the solution is located in a less explored or less dense part of the Pareto-optimal front.</p><p>If the Crowding Distance is low, the solution is in close proximity to other solutions. This indicates that the region where the solution is located is densely populated, and the diversity in that area is low.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C0K9yBb3fgA_18UfVuQaqQ.png" /></figure><p>Below, you can see the graphs illustrating the application of MOEA to the spacecraft trajectory design problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*_UeiTrL5MltTy8X5uXbPwA.png" /></figure><p>As observed, random solutions are initially generated. These solutions are quite distant from the Pareto front and are located in unrelated regions. In Figure 11, the solutions begin to approach the Pareto front, though some regions still show clustering. After 30 iterations, the solutions display a largely uniform distribution around the Pareto front. By 100 iterations, the solutions have fully aligned with the Pareto front.</p><p>As demonstrated, the algorithm produces a set of solutions that approach the Pareto front. However, a single solution is still required. In this case, the decision-maker must select the most appropriate solution based on the nature of the problem. At this stage, three methods are typically applied:</p><ul><li><strong>A-priori Approach:</strong> The decision-maker’s preference information is provided at the outset, and the search process focuses only on a specific region of the Pareto-optimal front.</li><li><strong>A-posteriori Approach:</strong> The decision-maker selects a preferred solution after the solutions have been identified. The decision-maker’s preference is utilized once the set of Pareto-optimal solutions has been determined.</li><li><strong>Interactive Approach:</strong> The decision-maker actively participates during the optimization process, interacting with the algorithm to guide the search.</li></ul><h4><strong>Multiobjectivization</strong></h4><ul><li>This approach aims to find more efficient solutions by using the advantages offered by MOEA in solving problems that are not actually multi-objective.</li><li>The original single-objective problem is transformed into a two- or more-objective problem. This goal is achieved by adding various sub-objectives.</li><li>A problem does not necessarily need to be divided into sub-parts. For example, if you are experiencing a performance problem in a genetic algorithm, it is possible to make this problem multi-objective by turning it into a mathematical model.</li></ul><h4><strong>Limitations</strong></h4><ul><li>MOEA performs exceptionally well for problems with two or three objective functions, but its performance becomes questionable as the number of objectives increases to four or five.</li><li>As the number of objectives increases, the size of the Pareto-optimal front grows exponentially.</li><li>Additionally, with an increasing number of objectives, the likelihood of randomly generated solutions dominating each other decreases.</li><li>This makes it challenging to effectively add new solutions to the population, leading to stagnation in the algorithm’s performance.</li></ul><h4><strong>Proposed Solutions for Limitations</strong></h4><p><em>Finding a Partial Set</em></p><p>For problems with a large number of objectives, identifying the entire Pareto-optimal front is both challenging and inefficient. Instead, MOEA procedures can target specific sections of the front based on decision-maker preferences. These approaches effectively and efficiently identify subsets of the Pareto-optimal front in problems with 10–20 objectives, enhancing MOEA algorithm performance and providing meaningful solutions. Examples include:</p><ul><li><strong>Reference Point-Based </strong>MOEA<strong>:</strong> Searches for solutions near predefined reference points.</li><li><strong>Light Beam Search:</strong> Directs the search toward specific directions.</li><li><strong>Biased Sharing:</strong> Focuses solutions in particular regions.</li><li><strong>Cone Dominance:</strong> Dominates solutions within conical regions.</li></ul><p>Another method involves improving the performance of multi-objective optimization problems by reducing the number of objectives. Principal Component Analysis (PCA) is utilized in MOEA problems to identify and eliminate redundant objectives.</p><h4><strong>Dynamic </strong>MOEA</h4><ul><li>Dynamic optimization addresses optimization problems where the problem definition, objectives, constraints, or parameters change over time.</li><li>In such problems, as the algorithm approaches the current optimum, the problem definition may shift, requiring the algorithm to solve a new problem.</li><li>However, the problem is assumed to remain fixed for a specific time interval, τ, during which it is solved.<br>The goal is not necessarily to find the optimal solution but to track the optimum as it evolves over time.</li><li>Accurately determining the time interval, τ, enhances the algorithm’s performance.</li></ul><h4>REFERENCES</h4><p>Deb, Kalyan. (2001). Multiobjective Optimization Using Evolutionary Algorithms. Wiley, New York.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e068e1ed0c66" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Orthogonality in Software]]></title>
            <link>https://medium.com/@hhilalkocak/orthogonality-in-software-c2fd6f73af81?source=rss-992d994d8f0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c2fd6f73af81</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Hilal Koçak]]></dc:creator>
            <pubDate>Sat, 20 Jan 2024 19:23:45 GMT</pubDate>
            <atom:updated>2024-01-20T19:23:45.827Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, today I would like to talk about the concept of orthogonality. This concept has gained popularity in the field of software development under titles like modular, component-based, and layered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*tOQgtKI-VJL0Vs5GC7gCsA.png" /><figcaption>Orthogonality</figcaption></figure><p>Orthogonality refers to the idea that two vectors are considered orthogonal if they create a 90-degree angle. If one vector moves north or south and the other moves east or west, we can talk about the concept of “Orthogonality.” Borrowed from geometry, this concept in software design means that systems are designed to be as independent or minimally dependent on each other as possible. In other words, if two or more aspects are orthogonal, a change in one does not affect the others. Changing the interface does not cause a change in the database. This allows for local fixes and improvements to be made.</p><p>Components perform different functions while collaborating with each other.</p><p>When adhering to the Orthogonality Principle in Software Development:</p><ul><li>Small self-contained components are written. These are much easier to test than testing a large block of code.</li><li>Changes remain local. The fixes do not break other areas and reduce the fragility of the system.</li><li>Dependencies are prevented from getting out of control and chaos is prevented in the system.</li></ul><p>In fact, adding code to a project runs the risk of diminishing the system’s orthogonality. As a result, it is useful to pose questions that cover the entire application. For example, you can ask if a similar function to the newly introduced one currently exists within the application. Critical thinking is really important in this situation.</p><blockquote>Keep your code decoupled</blockquote><p>Demeter’s Law suggests limiting the relationship of one class with other classes as much as possible.</p><p>This way, we create systems that are</p><ul><li>easier to document,</li><li>test,</li><li>make changes and add new modules to, making maintenance easier.</li></ul><p>Remember that, ease of maintenance in the future also affects the success of a project. Therefore, writing clean, organized, and sustainable code is just as important as learning any technology.</p><p>Wishing you plenty of coding and happy days :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c2fd6f73af81" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Yazılımda Diklik Prensibi : Orthogonality]]></title>
            <link>https://medium.com/@hhilalkocak/yaz%C4%B1l%C4%B1mda-diklik-prensibi-orthogonality-0530d904e929?source=rss-992d994d8f0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/0530d904e929</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[clean-code]]></category>
            <dc:creator><![CDATA[Hilal Koçak]]></dc:creator>
            <pubDate>Sat, 20 Jan 2024 19:12:23 GMT</pubDate>
            <atom:updated>2024-01-20T19:12:23.542Z</atom:updated>
            <content:encoded><![CDATA[<h3>Yazılımda Diklik Prensibi : Orthogonality</h3><p>Merhaba, bugün yazılım dünyasında; <em>modüler</em>, <em>bileşen-tabanlı</em> ya da <em>katmanlı</em> gibi sözcüklerle popülerleşen diklik prensibi kavramından bahsetmek istiyorum.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/345/1*tOQgtKI-VJL0Vs5GC7gCsA.png" /><figcaption>Orthogonality</figcaption></figure><p>İki vektör 90 derecelik bir açı oluşturuyorsa dik yani orthogonal kabul edilir. İki vektörden biri kuzey ya da güneye digeri doğu ya da batıya dogru hareket ediyorsa burada “Orthogonality’’ kavramindan bahsedebiliriz. Geometriden ödünç alınan bu kavram yazılımda sistemlerin birbirinden bağımsız ya da en az bağımlı olacakları şekilde tasarlanmasına denir. Yani iki ya da daha fazla olgu orthogonal ise birisindeki değişiklik diğerini etkilemez. Arayüzün değiştirilmesi, veri tabanında bir değişikliğe sebep olmaz. Bu şekilde lokal düzeltmeler ve iyileştirmeler mümkün olur.</p><p>Bileşenler birbirinden farklı işlevleri yerine getirirken ayni zamanda iş birliği içindedirler.</p><p>Diklik Prensibine Uyarak Yazilim Gelistirdigimizde:<br>- Kendine yeten küçük bilesenler yazılır. Test etmesi, büyük bir kod bloğuna göre çok daha kolaydır.<br>- Değişiklikler bölgesel olarak kalır. Düzeltmeler başka bölgelerin bozulmasına sebep olmaz. Bu nedenle sistemin kırılganlığı azalır.<br>- Bağımlılıkların kontrolden çıkması ve sistemde kaos olması engellenir.</p><p>Aslında projeye her kod eklendiğinde uygulamanın dikliğinin azalması riski vardır. Bu nedenle yeni eklenen fonksiyonun bir benzeri daha uygulama içerisinde bulunuyor mu gibi uygulamanın genelini kapsayan soruları kendimize sormak çok faydalıdır. Burada da devreye eleştirel düşünce tarzının önemi giriyor.</p><blockquote>Keep your code decoupled</blockquote><p>Demeter’in Yasası, bir sınıfın diğer sınıflarla olan ilişkisinin olabildiğince sınırlı tutulmasını söyler. Bu sayede;</p><ul><li>Doküman oluşturmanın,</li><li>Test etmenin ,</li><li>Değişiklik yapmanın ve yeni modüller eklemenin kolay olduğu bakımı daha kolay sistemler yaratırız.</li></ul><p>Unutmayalım ki; projenin ilerleyen zamanlarda bakımının kolay olması başarısını da etkiler. Bu nedenle herhangi bir teknolojiyi öğrenmek kadar, temiz, düzenli ve sürdürülebilir kodlar yazmak da çok önemlidir.</p><p>Bol kod yazmalı mutlu günler diliyorum :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0530d904e929" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kadınlar Yazılım İçin Uygun Mu? : Ada Lovelace]]></title>
            <link>https://medium.com/@hhilalkocak/kad%C4%B1nlar-yaz%C4%B1l%C4%B1m-i%CC%87%C3%A7in-uygun-mu-ada-lovelace-39fbe6d1ab86?source=rss-992d994d8f0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/39fbe6d1ab86</guid>
            <category><![CDATA[kişisel-gelişim]]></category>
            <category><![CDATA[yazılım]]></category>
            <dc:creator><![CDATA[Hilal Koçak]]></dc:creator>
            <pubDate>Sun, 10 Dec 2023 11:27:25 GMT</pubDate>
            <atom:updated>2023-12-12T11:29:38.990Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Kadınlar Yazılım İçin Uygun Mu? : Ada Lovelace</strong></p><p>Tarihte bilinen ilk programcının kadın olduğunu biliyor muydunuz? Ada Lovelace, bugün program dediğimiz talimat setlerini ilk kez oluşturan ve algoritmik düşünce tarzını ilk ortaya koyan kişidir.</p><p>Ada Lovelace 1833 yılında henüz 17 yaşındayken, kendisi gibi bir matematikçi olan Charles Babbage ile tanışmış ve sonra birlikte çalışmaya başlamışlardır. Charles Babbage karmaşık matematiksel işlemleri yapmayı sağlayan mekanik hesap makineleri üzerinde çalışıyordu. Tasarımı üzerinde çalıştığı makinelerden biri olan Analitik Motor; CPU ve hafıza gibi modern bilgisayar bileşenlerini içeriyordu.</p><p>Ada Lovelace, bu makinenin ardışık işlemleri takip ederek daha kompleks problemleri çözebileceğini düşünmüştür. Bunun üzerine bu makine üzerinde çalışabilecek talimatlar setini yazmıştır. Tarihte ilk kez bir problemin, daha küçük görevler ve birbirini izleyen aşamalara dönüştürülerek çözülmesi hedeflenmiştir. Yazılan bu talimatlar Bernoulli sayılarının hesaplanmasına yönelik adımları içeriyordu. Bu adımlara günümüzde algoritma deniyor.</p><p>Analitik motor o günün şartlarında inşa edilememiştir. Ada Lovelace’ın yazdığı programın çalıştırılması ve test edilmesi mümkün olmamıştır. Fakat makinenin matematiksel işlemlerden daha karmaşık işler yapabileceği ve bir talimatlar serisini izleyebileceği anlaşılmıştır. Bu nedenle Ada Lovelace modern programlamanın öncüsü kabul edilmiştir.</p><p>Ada Lovelace’ın hikayesinin yazılım kariyerinin hangi aşamasında olduğunuzun önemi olmaksızın kadınlara ilham olması gerektiğini düşünüyorum. Yazılım sektöründe ezici yoğunluğu erkeklerin oluşturması ya da kadınların beyinlerinin çalışma şeklinin erkeklerden farklı olması programlamaya yatkın olmadıklarını göstermiyor. Zorlanmak ya da bir işi uzun sürede yapmak da aynı şekilde. Bir işi öğrenirken zorlanmak sadece kadınlar için değil herkes için normaldir. Yeterince ve doğru kitaplar okunmadığını, doğru ortamlarda bulunulmadığını, yeterince denenmediğini ya da yanlış yöntemler kullanıldığını gösterir sadece.</p><p>Ayrıca bu zorlanmaya da farklı bir gözle bakılması gerektiğini düşünüyorum. Çünkü aslında bence birşeyleri kendimizi zorlayarak yapmak uzun vadede tükenme sendromuna götürüyor. Tabi yaptığın işten zevk almak lazım gibi bir klişeden bahsetmiyorum. Kendimizi denemeye teşvik etmek gerekiyor. Özellikle hata yapmaktan ölesiye korkutularak büyütülen kız çocuklarının yeni birşey denemesinin oldukça güç olması çok anlaşılır bir durum. Burada devreye parçalara bölerek ve basitten başlayarak kendimizi cesaretlendirmemiz girmeli. Bu nedenle hoşa gidecek ve yormayacak adımlarla başlanmalı. Zaten zamanla merak duygusu ile birlikte bu korku zinciri kırılacak ve konu hakkındaki hakimiyet artacaktır. Bilgi arttıkça da özgüven ve üretilen işler birbirini yükseltmeye devam edecektir.</p><p>Yazılımın içimizdeki yaratıcılığı açığa çıkaracak mucizevi bir gücü olduğunu düşünüyorum. Özellikle kadınların doğalarında bulunan; olgular arasında ilişki kurma, çok yönlü düşünme, detaylara dikkat etme gibi özelliklerin yazılım dünyasına katkı sağlayacağını düşünüyorum.</p><p>Tabiki korku ve pes etme gibi duygulara rağmen içlerindeki, denemeye meraklı küçük çocuğa kulak verdikleri sürece.</p><p>Türkiye’de ve tüm dünyada kadın yazılımcı sayısının artmasını dileyerek yazımı sonlandırıyorum. Şimdilik hoşçakalın.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39fbe6d1ab86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[First Django Project]]></title>
            <link>https://medium.com/@hhilalkocak/first-django-project-deb26b137cef?source=rss-992d994d8f0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/deb26b137cef</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[django]]></category>
            <dc:creator><![CDATA[Hilal Koçak]]></dc:creator>
            <pubDate>Fri, 20 Jan 2023 09:09:57 GMT</pubDate>
            <atom:updated>2023-01-25T12:17:54.914Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Hello, in this article I want to explain how to create a Django project from 0 using VsCode. Actually, I’m taking notes for myself as well.</em></p><p>We usually don’t want to install packages like Django on our own computer. Because different versions can be used in each project. Therefore, we create a virtual environment. Because I use Mac OS X, these commands are only for those who use this operating system.</p><p>Firstly, to manage our virtual environments we must install virtualenv. You can learn if you have virtualenv installed in your system with the code below.</p><pre>python3 -m virtualenv — version</pre><p>Run to install virtualenv if you don’t have it.</p><pre>pip3 install virtualenv</pre><p>Then we create a folder named Project1 and open it in VsCode. Then we create a virtual environment named Project1_venv. We don’t call it venv because we don’t want that after all venv’s get mixed up.</p><p>Run the following code from Project1 terminal to create a virtual environment.</p><pre>virtualenv project1_venv</pre><p>Run the code below to activate the virtual environment we created.</p><pre>source project1_venv/bin/activate</pre><p>Now you can install the desired package of Django in this virtual environment like below.</p><pre>pip install Django==3.6.1</pre><p>Or you can install last version of it.</p><pre>pip install Django</pre><p>Run the code below to see the packages installed in the virtual environment.</p><pre>pip freeze</pre><p>After run pip freeze command you will see the packages like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q1LzI9La-iictv53Y3I6Pw.png" /></figure><p>When you run the code below, the versions of the packages downloaded to the environment are saved in requirements.txt</p><pre>pip freeze &gt; requirements.txt</pre><p>We can delete the virtual environment we want and reinstall the same packages and versions using requirements.txt with code below.</p><pre>pip install -r requirements.txt</pre><p>We can close the virtual environment as follows</p><pre>deactivate</pre><p>If we want, we can permanently delete the virtual environment as follows.</p><pre>rm -Rf project1_venv</pre><p>So far firsly, we have opened a folder named Project1 in VsCode. Secondly, we created virtual environment and activate it. Then we installed Django to this environement. Finally we can run code below to create our first project named project1. We are using . to represent this folder.</p><pre>django-admin startproject project1 .</pre><p>The created project will have automatically generated manage.py.</p><p>Run the code below to create new application to project named new_app. This app has migration files.</p><pre>python manage.py startapp new_app</pre><p>We should apply migrations to create db.sqlite3 database file.</p><pre>python manage.py migrate</pre><p>To run the django project on localhost, enter the code below.</p><pre>python ./manage.py runserver</pre><p>If you see the following screen, you have successfully opened a Django project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3Xiq0bO6D9f8BJeq9sfuMg.png" /></figure><p>Bye for now. :D</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=deb26b137cef" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CSS Framework : Bootstrap]]></title>
            <link>https://medium.com/@hhilalkocak/css-framework-bootstrap-e78e8330dce9?source=rss-992d994d8f0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e78e8330dce9</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[bootstrap]]></category>
            <dc:creator><![CDATA[Hilal Koçak]]></dc:creator>
            <pubDate>Thu, 12 Jan 2023 20:46:10 GMT</pubDate>
            <atom:updated>2023-01-12T20:46:10.300Z</atom:updated>
            <content:encoded><![CDATA[<h3>CSS Framework : Bootstrap</h3><p><em>I’m on the 12th day of my web development journey, which I started as a 2023 new year goal. After CSS, I started working on Bootstrap and I wanted to share my experience with you. You will find what I learned and the project I made, along with their codes, on the following lines.</em></p><p>Bootstrap is a popular front-end framework for web development. It is an open-source toolkit that provides a set of CSS and JavaScript components that developers can use to build responsive, mobile-first websites.</p><p>One of the key features of Bootstrap is its grid system, which allows developers to create flexible, responsive layouts that adapt to the size of the screen. The grid system is based on a 12-column layout, and developers can use classes to specify how many columns a particular element should span, and how the elements should be aligned and spaced.</p><p>Bootstrap also provides a wide range of pre-designed UI components, such as navigation bars, forms, buttons, and modals, that can be easily customized and integrated into a website. These components are designed to be consistent across different browsers and devices, and they come with a set of predefined CSS styles that can be overridden to match the design of the website.</p><p>Additionally, Bootstrap provides a set of JavaScript plugins, such as carousels, modals, and tooltips, that can be used to add interactivity and dynamic behavior to a website.</p><p>Overall, Bootstrap provides a convenient and efficient way for developers to create professional-looking websites that are responsive, accessible, and easy to maintain.</p><p>You can reach the project I made using Bootstrap at the end of the 12th day by starting web learning from 0 by using the <a href="https://bootstrap-project-level1.netlify.app/">link</a>.</p><p>These are pictures belong to site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QP0jlpMxesmgnkgctdrm4A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YKvWj12LUPVWvydJxqvOpA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mdl_gguGyXX5yAV73UyBIg.png" /></figure><p>You can download source code from <a href="https://github.com/HilalKocak/Bootstrap-Project-Level1">here</a>.</p><p>Bye for now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e78e8330dce9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is CSS?]]></title>
            <link>https://medium.com/@hhilalkocak/what-is-css-c32d25e65944?source=rss-992d994d8f0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c32d25e65944</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Hilal Koçak]]></dc:creator>
            <pubDate>Mon, 09 Jan 2023 09:57:15 GMT</pubDate>
            <atom:updated>2023-01-09T09:57:15.911Z</atom:updated>
            <content:encoded><![CDATA[<p><em>I started the Web Development journey with Python and I am learning about Web Frontend these days. My baby steps include CSS for sure :)</em></p><p>Cascading Style Sheets (CSS) is a stylesheet language used for describing the look and formatting of a document written in HTML (HyperText Markup Language). CSS is used to control the style of a website by changing colors, fonts, layout, and other design elements.</p><p>CSS allows you to apply styles consistently across multiple pages of a website, making it easier to maintain and update the look and feel of a website. It also separates the content of a website (written in HTML) from its presentation (controlled by CSS), making it easier to modify the appearance of a website without changing its content.</p><p>Some common uses of CSS include:</p><ul><li>Changing the font, size, and color of text</li><li>Adding background colors and images</li><li>Setting the layout of a webpage (e.g. column layout, grid layout, etc.)</li><li>Setting the margins, padding, and other spacing of elements</li><li>Creating hover effects and animations</li><li>Creating responsive designs that adapt to different screen sizes and devices</li></ul><p>CSS is an essential part of modern web development, and it is used by millions of websites around the world. It is a powerful and flexible tool for styling and formatting web pages, and it allows developers to create visually appealing and user-friendly websites.</p><p>Here is my trial web site <a href="https://csssamplework.netlify.app/">link</a> using CSS.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fi7wHA39yPUIY_NPelsuWg.png" /></figure><p>You can reach the codes with the <a href="https://github.com/HilalKocak/CSS_Sample">link</a>.</p><p>Bye for now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c32d25e65944" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Chat GPT’nin Başarısı]]></title>
            <link>https://medium.com/@hhilalkocak/chat-gptnin-ba%C5%9Far%C4%B1s%C4%B1-de36f5e50c95?source=rss-992d994d8f0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/de36f5e50c95</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[transformers]]></category>
            <dc:creator><![CDATA[Hilal Koçak]]></dc:creator>
            <pubDate>Thu, 08 Dec 2022 10:51:46 GMT</pubDate>
            <atom:updated>2022-12-08T10:51:46.786Z</atom:updated>
            <content:encoded><![CDATA[<p>Merhaba,</p><p>GPT (Generative Pretrained Transformer) bir dil modelidir ve OpenAI tarafından eğitilmiştir. Bu model, verilen bir girdi metni üzerinde çalışarak benzer bir çıktı metni üretebilme yeteneğine sahiptir. Örneğin, bir konuşma konusu verilerek GPT modeline, model konuşmayı devam ettirerek ekstra bir metin üretebilir.</p><p>GPT modelinin sırrı, dil modelleme algoritmaları ve çok büyük bir veri kümesi kullanılarak eğitilmesindedir. Bu sayede, model dil yapısı ve kalıpları hakkında oldukça fazla bilgi sahibi olur ve verilen girdi metniyle uyumlu bir çıktı metni üretebilir.</p><p>Ayrıca, GPT modeli Transformer adlı bir dil modelleme tekniğini kullanır. Bu teknik, dil modelleme işleminin daha hızlı ve verimli bir şekilde gerçekleştirilmesini sağlar.</p><p>Sonuç olarak, GPT modeli dil modelleme algoritmaları ve büyük bir veri kümesi kullanarak eğitilmiş, Transformer tekniğini kullanarak çıktı metni üretme yeteneğine sahip bir dil modelidir. Bu sayede, kullanıcılar verilen bir girdi metni üzerinde çalışarak benzer bir çıktı metni üretebilirler.</p><p><em>Aşağıdaki resimde gördüğünüz gibi şimdiye kadar okuduğunuz tüm yazı ChatGPT’nin kendisi tarafından yazılmıştır :)</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tmXFP25Msxp4p3frWzscOQ.png" /></figure><p><em>Detaylı incelemek için </em><a href="https://chat.openai.com/chat"><em>linki</em></a><em> kullanabilirsiniz.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de36f5e50c95" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Fast API for Machine Learning]]></title>
            <link>https://medium.com/@hhilalkocak/fast-api-for-machine-learning-9fba7e9f6346?source=rss-992d994d8f0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9fba7e9f6346</guid>
            <category><![CDATA[python-web-developer]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[fastapi]]></category>
            <dc:creator><![CDATA[Hilal Koçak]]></dc:creator>
            <pubDate>Sun, 30 Oct 2022 05:50:25 GMT</pubDate>
            <atom:updated>2022-10-30T06:00:09.684Z</atom:updated>
            <content:encoded><![CDATA[<p><em>We trained a machine learning model in a Jupyter Notebook, Colab or VsCode environment and got the result. What happens next?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AEONFaJvxuXhZRxRsb1PbQ.png" /></figure><p>Designing and running different machine learning models is actually just making simple and useless applications that run on our computer and with a specific data set.</p><p>To generate benefits, we must expose our machine learning models to user experience. To put it another way, we need to deploy machine learning models by converting them into APIs.</p><p>Popular Python Web Frameworks:<br>- Django<br>- Flask<br>- Fast API and<br>- Streamlit</p><p>In this article, I will talk about FastAPI.</p><p>Fast API is a RestAPI development tool. While writing API with FastAPI, we can use HTML, CSS and JavaScript codes in Python. It is also possible to use data visualization libraries like matplotlib, pyplot and seaborn etc.</p><p>I made the code example that I will share in this article using VsCode. First of all, we need to do the following installations before starting the application.</p><pre>pip install fastapi</pre><p>We need a server to run your applications made with Fast API. In order for this api to work as a web server, we need to install uvicorn.</p><pre>pip install uvicorn</pre><p>This application is a machine learning application that uses the <a href="https://github.com/HilalKocak/Basic_FastAPI/blob/master/BankNote_Authentication.csv">BankNote_Authentication.csv</a> dataset with variance, skewness, curtosis and entropy features to make binary classifications of 1 and 0 as real banknotes and fake banknotes.</p><ul><li>You can reach the notebook where the model is trained by using the link below.</li></ul><p><a href="https://github.com/HilalKocak/Basic_FastAPI/blob/master/ModelTraining.ipynb">Basic_FastAPI/ModelTraining.ipynb at master · HilalKocak/Basic_FastAPI</a></p><ul><li>If you run the ModelTraining.ipynb file step by step, you will get the classifier.pkl file in the project directory.</li><li>To download the libraries used by the project, use</li></ul><p>After training the model, pickle, which is a Python built in module, is used to make it a file with pkl extension and use it in FastAPI.</p><p>The data set to be used in the project is as follows.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b21603d9615c30def38eadd11691e13/href">https://medium.com/media/7b21603d9615c30def38eadd11691e13/href</a></iframe><p>We create the model to represent our dataset as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff02f47fa1b98aa6c25d5a6921f885ee/href">https://medium.com/media/ff02f47fa1b98aa6c25d5a6921f885ee/href</a></iframe><p>The code snippet below shows how to handle GET and POST requests with FastAPI.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/89e98d9737d27372cb0dd25121b937cd/href">https://medium.com/media/89e98d9737d27372cb0dd25121b937cd/href</a></iframe><p>The following line of code is used to run our application made with FastAPI.</p><pre>uvicorn app:app --reload</pre><p>Here, the first parameter refers to the python script name that we wrote FastAPI, and the second parameter refers to the object name that we created with app=FastAPI().</p><p>Reload allows us to access updates by refreshing the website without re-running the program when we make a change in the code and save it.</p><p>You can access all the codes from the link below. You can run it successfully in VsCode by following the instructions. Bye for now.</p><p><a href="https://github.com/HilalKocak/Basic_FastAPI">GitHub - HilalKocak/Basic_FastAPI</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9fba7e9f6346" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Streamlit Ag-Grid]]></title>
            <link>https://medium.com/@hhilalkocak/streamlit-aggrid-6dbbab3afe03?source=rss-992d994d8f0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/6dbbab3afe03</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ag-grid]]></category>
            <category><![CDATA[streamlit]]></category>
            <dc:creator><![CDATA[Hilal Koçak]]></dc:creator>
            <pubDate>Tue, 20 Sep 2022 12:01:11 GMT</pubDate>
            <atom:updated>2022-09-20T12:05:20.954Z</atom:updated>
            <content:encoded><![CDATA[<p>AgGrid is a JavaScript-based grid type that is very simple to use, fast and very fancy for your Python web applications using Streamlit, but with very limited flexibility.</p><p>Streamlit AgGrid is an open source grid created by <a href="https://www.youtube.com/watch?v=RHTJCwYfxSk&amp;t=61s&amp;ab_channel=ag-Grid">Pablo Fonseca</a> that includes enterprise features, but you can use stylish graphs and tables at no cost.</p><p>By using the <a href="https://pablocfonseca-streamlit-aggrid-examples-example-jyosi3.streamlitapp.com/">link</a>, you can access many table types and codes that can be made with AgGrid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L2dYkhZ1lTsNk_m0ssBghg.png" /><figcaption>View of AgGrid and Chart Filled Data From AgGrid</figcaption></figure><p>Now we will examine how AgGrid is used by making an example.</p><p>We need to import the following libraries to make a mutable and interactive table. We will explain how to use it in the following pages.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eHUwa-UIZUt9Xd6A8oVPSQ.png" /></figure><p>Since AgGrid is a JavaScript-based grid, the background properties of columns or cells can be changed by adding JavaScript code to the Python code. I am adding the JsCode library to be able to use JS code in the Grid.</p><p>It is important to include the <a href="https://streamlit-aggrid.readthedocs.io/en/docs/GridOptionsBuilder.html">GridOptionsBuilder</a> library. Because it provides AgGrid configuration with the methods in it. Some of the methods included are as follows.<br>- configure_columns<br>- configure_selection<br>- configure_pagination<br>- configure_grid_options</p><p>In the code snippet below, firstly, the GridOptionsBuilder object is created with the dataframe read from a local csv file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XwWFTnEDLgRuKjKjj8U9yQ.png" /><figcaption>GridOptionsBuilder</figcaption></figure><p>We are using GridOptionsBuilder to decide which columns are editable, checkbox is used or multi selection is allowed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LiGeA2O7Da968fLagTYEtA.png" /><figcaption>Pagination=enabled</figcaption></figure><p>After making the necessary adjustments with the GridOptions Builder, we can create the Ag Grid object and make it appear on the screen like below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dp4Fo7bqPPrBZPNZrIq7rg.png" /><figcaption>AgGrid Description</figcaption></figure><p>After the user makes the necessary updates, the current dataframe in AgGrid is retrieved as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MeNPt0svtzsXwnpjYbw7aw.png" /></figure><p>We can also get the selected lines using the following lines of code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zYS3v4DOVcn4-_kZ5KD2Fg.png" /></figure><p><strong>You can test and examine many features of Ag Grid live from its creator in the </strong><a href="https://pablocfonseca-streamlit-aggrid-examples-example-jyosi3.streamlitapp.com/"><strong>link</strong></a><strong>. Highly recommended.</strong></p><p>For more information about Streamlit, you can visit:</p><p><a href="https://streamlit-aggrid.readthedocs.io/en/docs/">Welcome to streamlit-aggrid&#39;s documentation! - streamlit-aggrid 0.2.3 documentation</a></p><p>Bye for now.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6dbbab3afe03" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>