avatarPratishtha Gupta

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

2627

Abstract

C++ backend and parallelized operations.</p><div id="6c6a"><pre>mamba <span class="hljs-built_in">env</span> create -f environment.yml</pre></div><h1 id="f6a2">Poetry</h1><p id="503c">Poetry is a Python dependency management tool that’s great for packaging and dependency resolution, often used in production setups for microservices.</p><div id="d658"><pre><span class="hljs-meta">#!/bin/bash</span>

<span class="hljs-comment"># Navigate to your git repository</span> <span class="hljs-built_in">cd</span> /path/to/your/git/repository <span class="hljs-comment"># Replace with the path to your git repository</span>

<span class="hljs-comment"># 1. Install Poetry globally (you can also install it locally per-project if preferred)</span> curl -sSL https://install.python-poetry.org | bash

<span class="hljs-comment"># 2. Initialize poetry for your project (this will create a pyproject.toml and optionally a poetry.lock file)</span> poetry init

<span class="hljs-comment"># The above command will guide you through creating your pyproject.toml.</span> <span class="hljs-comment"># If you want it to interactively discover and add your dependencies, make sure you've a virtual environment activated or it will consider globally installed packages.</span> <span class="hljs-comment"># Alternatively, you can manually add dependencies later by editing the pyproject.toml file.</span>

<span class="hljs-comment"># 3. If you already know some dependencies you want to add, you can do so with:</span> <span class="hljs-comment"># poetry add <package_name></span>

<span class="hljs-comment"># For example:</span> <span class="hljs-comment"># poetry add requests</span>

<span class="hljs-comment"># 4. Commit the new/changed files to your git repository</span> git add pyproject.toml git commit -m <span class="hljs-string">"Initialize Poetry for dependency management."</span>

<span class="hljs-comment"># Optionally, if a poetry.lock is created (which it will after you add some dependencies):</span> git add poetry.lock git commit -m <span class="hljs-string">"Add Poetry lock file."</span>

<span class="hljs-comment"># 5. Whenever you want to install the project dependencies, use:</span> <span class="hljs-comment"># poetry install</span>

<span class="hljs-comment"># And that's it! You can now use Poetry for dependency management in your git repository.</span></pre></div><figure id="2588"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*paBq6pDxV-TqXtOTRAMJJw.png"><figcaption>Poetry</figcaption></figure><p id="567a">Choosing a package and environment manager for Python projects depends on

Options

various factors like the project’s requirements, your familiarity with the tool, and the specific use cases you’re targeting. Here’s a brief comparison of <code>conda</code>, <code>poetry</code>, and other common tools like <code>pipenv</code> to help guide your decision:</p><h2 id="640f">Conda</h2><p id="6292">Conda is a powerful package manager especially useful for projects that involve scientific computing and data science tools. One of its primary advantages is managing non-Python libraries with Python interfaces or dependencies, such as TensorFlow which might have specific non-Python requirements. Conda supports creating isolated environments, operates cross-platform, and can handle complex dependencies. However, it can be bulkier and slower than some other tools, and it operates in a separate ecosystem from standard Python (PyPI), which sometimes results in waiting periods for package updates. It’s ideal for projects that require non-Python dependencies or for ensuring cross-platform consistency.</p><h2 id="6633">Poetry</h2><p id="02f2">Poetry is a modern tool that simplifies both dependency management and packaging for Python projects. It offers robust dependency resolution and utilizes <code>pyproject.toml</code>, streamlining configuration. Every project gets its virtual environment, ensuring isolated dependencies. Being a newer tool, it might not be as familiar to some teams, and it's limited to managing only Python dependencies. Poetry is excellent for Python projects that require both dependency management and packaging.</p><h2 id="ed35">Pipenv</h2><p id="ffc1">Pipenv combines the best of <code>pip</code> and <code>virtualenv</code>. It provides both package and environment management in one tool. It uses <code>Pipfile</code> and <code>Pipfile.lock</code> to pin dependencies, ensuring consistent builds. While it brings together the advantages of pip and virtualenv, it can be slower in resolving dependencies than, say, poetry. Some users also find it less reliable in certain scenarios compared to conda or poetry. Pipenv is suitable for general Python application development where you want package and environment management in one place.</p><p id="11e8">The choice between these tools largely depends on the project’s requirements. Projects with non-Python dependencies or a focus on data science might lean towards conda. In contrast, pure Python projects looking for modern dependency management might prefer poetry. For more straightforward applications, pip or pipenv can suffice. The key is consistency and familiarity within your team or organization.</p></article></body>

Photo by Lesly Juarez on Unsplash

3 simple rules for a better (mental) hygiene

Unconventional, organic and independent

Umm, mental hygiene?

Cleansing and giving sufficient nutritional value to your body isn’t enough, or so I have realized in this quarantine journey.

We pick up cues; essentially the narratives, stories, and habits, that weave the thread of our thought processes. And in these cues — is where we find the power to balance our mind and body.

But what is this thread hasn’t been stitched well?

It breaks our power — it leads to a loss of self-control.

Tell me if there haven’t been times when you knew something that you were going to say or do is harmful but you did it anyway. Tell me if there haven’t been times when you know you aren’t feeling too good about yourself, no matter how much confidence you emit on the surface. Tell me if fitness of the body and a healthy lifestyle gives you a sense of direction and hold on what makes your day.

You’re a genius if your answers say otherwise because I surely learned my lessons hard and made a side note in my ocean palm.

Simple and sweetly baked 3 strands of layer — that gives out the tastiest cake in the whole wide world.

Rule 1. Take the 21-day challenge: I swear this is the most underrated measure of things in the long term scheme. Whatever, and I say that again in bold — whatever weaknesses you think you have — take them one by one, peel them off raw and put it in a mixer with the 21-day challenge. Any human weakness/problem statement occurs because of some pre-designed pattern that can be cracked by the mind when you break it purposely, one shred at a time. If you are lucky, you will be able to do it in one go. But history suggests otherwise and the mere fact that its a weakness will make you bend on your knees and you’d fail. And not just once, or twice. Several attempts and a crushing smile at the bottom, you will find yourself slightly better and rising at the top.

Rule 2. Put the Screen Time on your phone, just like right away: It is easier to say that your screen time must be 4/5/6/7 hours when you just have to estimate. But when you practically see yourself submerged under the water, all day, every day, for weeks — it changes how you feel about yourself, your life and everything that you do on your phone. With the lockdown in place, its in fact harder to stay away since work, study and even free time — all end up leading to digital nativity. Where is my peace of my mind? Nowhere. No matter how many calories I am burning every day — I go back to my bed thinking about the last post I saw on Instagram and if I should open WhatsApp again and do that reply now or later in the morning. I am captivated by every external factor that can possibly exist and doing things that the internet says are going to help me. Do they? My screen time will surely reflect.

Rule 3. Create a journal: This is obviously the most unlikable feature of the cake because of the immense hard work and exploration that comes with it as baggage. Problem isn’t writing. Problem is reflecting about yourself and then spilling it out loud. Journals are the medium where we channelize our true energies with maximum vulnerability. It proves to be the matchstick to ignite all the suppressed energy that the body has forgotten about. The difficult part? Consistency. Not just in routine. But in the hard work that comes in thinking about your actions and day in retrospect; especially the parts you would conveniently forget otherwise. It builds your metabolism to avoid the same bullshit that your negative self might feed you everyday and also encourage you to uplift yourself on days when you don’t have your shadow around.

Cherry on the cake? A bombshell mix of all three things happening together and not in isolation.

But you try one, and tell me if this didn’t make your life better? Because it’s a tried and tested thing. It works because our mind functions in a specific way, irrespective of our differences.

Challenge — Calculate — Create

So, 3Cs for some peace, and your mental health would really never seize

Self Improvement
Self-awareness
Life Lessons
Mental Health
Growth
Recommended from ReadMedium