avatarDina Alexander

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>

How To Grow: Be Brave, Bold, and Unpopular?

The latest advice on Medium is to write without a filter.

Photo by 𝔸𝕧𝕒 𝕋𝕪𝕝𝕖𝕣 on Unsplash

With 400,000 paid members on Medium, how do you stand out?

According to the articles suggested this week, you stand out by writing without a filter. We need to stop pleasing people, according to articles like this.

Is unpopular the new popular?

There might be some truth to that. You know what people say about comfort zones, so how will you grow and expand your comfort zone if you only express popular, ‘safe’ opinions?

As a psychology graduate and horror writer, I know we don’t all agree with these ‘popular’ opinions… you’re dark and twisted deep down inside, like the rest of us ;)

Thankfully, I came across an article about two topics you should avoid on Medium unless you want an angry mob:

Religion and politics.

That makes sense. They have started more wars than anything else.

On that note, here are three unpopular opinions that will help me grow as a person:

Religion

I wish I were religious. It looks comforting, knowing someone will always love you and forgive you, but…

There is no convincible, scientific evidence of a deity watching over us from afar. Hell, merely the existence of a universe this enormous, this complex, contradicts the whole concept of religion. I’ll go as far as to claim if religion was abolished, the world would be a more peaceful place to live (how many wars have started because of religion?).

Speaking of hell, it was a threat used by Christianity to keep people in line. At best, hell is an emotion, a fleeting feeling caused by unique, horrible circumstances, like the death of a loved one.

But(!), religion is good for keeping people in line. Forget the panopticon. Nothing works better for civil obedience than the threat of an omnipotent, omniscient authority figure.

Gun Control

Nobody but trained officers should be armed. That’s right; your constitutional right to bear arms should be removed. Farmers and hunters, hand back those rifles and shotguns as well. In 2021, with the climate crisis and animal rights, nobody should be hunting for anything.

Why no guns? Because history has made it clear that the general public cannot be trusted with firearms. Work two months in retail and it’ll become abundantly clear why live ammo in the hands of the average Joe is a terrible idea.

If you want to fight with someone, use your hands. Or better yet, don’t.

Abortion

Only women should have any say in abortion rights. That’s right, I said it. Sharpen your pitchforks; there’s an opinionated feminist behind this keyboard. Keep religion out of the abortion debate as well, for that matter, unless you’re hoping to create Gilead.

In 2021, as a society, we should not be sending women to prison for a miscarriage. What’s next, penalise women for having a period because it ‘wasted’ an egg? Punish men for masturbating because it ‘wastes’ sperm?

If only these politicians intent on removing ‘choice’ fought this hard to punish sexual assaults…

Final Thoughts

The beauty of opinions is that we all have them, and as other writers have said, writing to please others is wasted writing. The only opinions we should keep back are those who harm others.

Follow The Orange Journal so you don’t miss a post. Do you love to write about self-improvement and personal development? Learn how to be added as a writer here. 🍊

The Orange Journal
Politics
Religion
Opinion
Advice
Recommended from ReadMedium