teleren/devto huggingface dataset:
Check Python Memory Usage
Tags: python, memory
Published: 2023-01-30 08:52:33

---
title: Check Python Memory Usage
published: true
description: 
tags: python,memory
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-01-30 08:43 +0000
---

- [Monitoring memory usage of a running Python program - GeeksforGeeks](https://www.geeksforgeeks.org/monitoring-memory-usage-of-a-running-python-program/)

## Build-in libraries

- [tracemalloc — Trace memory allocations — Python 3.11.1 documentation](https://docs.python.org/3/library/tracemalloc.html)

```python
import tracemalloc

print(tracemalloc.start())
# ...
# my ugly code
# ...
print(tracemalloc.get_traced_memory())

# shows (current_usage, peak)
```

## Tools

- [pythonprofilers/memory_profiler: Monitor Memory usage of Python code](https://github.com/pythonprofilers/memory_profiler)
- [bloomberg/memray: Memray is a memory profiler for Python](https://github.com/bloomberg/memray)

```python
# need pip install memory_profiler
from memory_profiler import profile

@profile
def my_ugly_func():
  # ...
  # ...

# show memory usage line by line
```

## Other

Tkinter initial use 41.9 MB

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jzx54q9nkzvxhhs4yp9x.png)
CodePen Designs - 29 : tsParticles - Cursor Rainbow Shapes Trail
Tags: codepen, css, webdev, design
Published: 2023-01-30 08:52:12

### We are excited to introduce our new series that will explore the best design ideas from the Codepen community. 

We will be publishing these each day and hope you find them insightful and inspiring as we showcase some of the most talented designers in this space.

---


#### Codepen Design - 29

<p>tsParticles - Cursor Rainbow Shapes Trail</p>

{% codepen https://codepen.io/matteobruni/pen/XWBqZdN %}



---
## For more information

1. Check my GitHub profile
[https://github.com/amitSharma7741](https://github.com/amitSharma7741)

2. Check out my Fiver profile if you need any freelancing work
[https://www.fiverr.com/amit_sharma77](https://www.fiverr.com/amit_sharma77)

3. Check out my Instagram
[https://www.instagram.com/fromgoodthings/](https://www.instagram.com/fromgoodthings/)

4. Linktree
[https://linktr.ee/jonSnow77](https://linktr.ee/jonSnow77)

5. Check my project

- EVSTART: Electric Vehicle is the Future
[https://evstart.netlify.app/](https://evstart.netlify.app/)
-  News Website in react
 [https://newsmon.netlify.app/](https://newsmon.netlify.app/)
-  Hindi jokes API
 [https://hindi-jokes-api.onrender.com/](https://hindi-jokes-api.onrender.com/)


---
---
Organize Your Downloads Folder with Ruby
Tags: ruby, programming, productivity, webdev
Published: 2023-01-30 08:48:35

Are you like me and have an ocean of files in your downloads folder? No matter how I try or promise myself I'll clean it up daily I never do. So, this morning I decided to throw a small app together with Ruby and do something about it!

---

**What the app does:**
- Goes through all the files and directories in your `Downloads` folder and checks the last modified date, and then moves the file/directory into a subfolder in downloads according to the year it was last modified. 

```ruby
require 'find'
require 'fileutils'


downloads_folder = File.join(Dir.home, "Downloads")

## Array of years, used in the filtering logic.
yearly_folders = ["2019", "2020", "2021", "2022", "2023", "2024", "2025"]

Dir.foreach(downloads_folder) do |file|
## Filtering logic.
## Skip Subfolders and Foldersnames included in "yearly_folders" array.
  next if file == "." || file == ".." || yearly_folders.include?(file)

  ## Makes creates a string for the path of the file/directory
  path = File.join(downloads_folder, file)
  next unless File.exists?(path)

  ## Getting the modified date of the file/directory.
  last_edited = File.mtime(path)
  year = last_edited.strftime("%Y")
  new_directory = ("#{downloads_folder}/#{year}")

  ## If a folder with modified file's year does not exist - create it.
  unless File.directory?(new_directory)
    puts "Create Folder"
    Dir.mkdir(new_directory)
  end

  ## If the file/directory is NOT the same as the new_directory, move it to the new directory.
  if path != new_directory
    FileUtils.mv(path,new_directory)
  end
end

```

---

**RESULT**


![result gif](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sw9cd36gj3ixja4myeky.gif)
---


Now, this works well enough for me right now. I've also added it to automatically run whenever I login to my account. 💪🏻

But in the future I'll be implementing:

- Subfolders for months
- Filter by filetype
Optimizing AWS Lambda Functions to Reduce Cold Start Times 🔥🚀
Tags: awslambda, awscommunitybuilders, serverless, aws
Published: 2023-01-30 08:47:29

AWS Lambda's cold start issue continues to be a topic of discussion among developers 💻. But did you know that optimizing your code 🔧 and properly allocating memory 💾 can significantly reduce the duration of a cold start?

Here are a few tips to consider:

1. Keep your function code concise and only include necessary libraries. 📚

2. Enable Provisioned Concurrency for frequently accessed functions. 🚀

3. Choose the correct runtime of a Lambda function. 👨‍💻 

⚡ Bonus Tip: 
This tool by Maxime DAVID visualize 10 Cold Starts for each runtime, updated daily. - https://maxday.github.io/lambda-perf/


By following these best practices, you can improve the performance of your AWS Lambda functions 💡 and provide a seamless user experience 🎯. For more tips and insights, connect with me on LinkedIn. 🚀

[Bhavesh Gohel](https://www.linkedin.com/in/bhaveshgohel)
Introducing CodeBoost: The AI-Powered Code Completion Extension for Visual Studio Code
Tags: vscode, javascript, ai, openai
Published: 2023-01-30 08:43:37

{% embed https://www.youtube.com/watch?v=I_FpcadnjPY %}


Join waitlist : https://sago.lk/


AutoCode AI, now known as CodeBoost, is a cutting-edge code completion extension for Visual Studio Code that uses artificial intelligence to help developers write code faster and more accurately. With its AI-powered predictions, developers can write code much faster than they would with traditional code completion tools.

One of the key benefits of CodeBoost is its ability to learn from a developer's coding style and preferences. The more a developer uses the extension, the more accurate its predictions become, leading to even greater efficiency gains. This makes CodeBoost an ideal tool for developers who want to save time and increase their productivity.

CodeBoost also offers improved accuracy compared to traditional code completion tools. Its advanced AI algorithms ensure that the suggestions it generates are accurate and relevant to the code a developer is writing. This reduces the risk of coding errors and helps developers avoid common mistakes that can cause problems later in the development process.

In addition to its speed and accuracy, CodeBoost is also highly customizable. Developers can configure the extension to work with their preferred programming language and set their own preferences for how the AI should generate suggestions. This allows developers to get the most out of the tool and ensures that it integrates smoothly into their development process.

The user interface of CodeBoost is intuitive and user-friendly, making it easy for developers to access the suggestions generated by the AI and insert the right code snippets into their projects with just a few clicks. This means that developers can take advantage of CodeBoost's features without sacrificing the efficiency they've come to expect from traditional code completion tools.

In conclusion, CodeBoost is an excellent tool for developers who want to boost their productivity and increase their coding efficiency. With its lightning-fast code suggestions, improved accuracy, and customizable options, it's the perfect tool for developers who want to stay ahead of the curve. Whether you're a seasoned programmer or just starting out, CodeBoost is the perfect tool to help you write better code, faster.
#TestCulture 🦅 Episode 23 - Testing for SAP
Published: 2023-01-30 08:40:01

What is SAP?

SAP is one of the world’s leading producers of software for the management of business processes, developing solutions that facilitate effective data processing and information flow across organizations.

What is SAP Testing?

SAP testing is a type of software testing that validates SAP ERP implementations. When you modify or customize a SAP software, test cases must be created to verify the new functionality.

Since this system is responsible for maintaining a database of information, it’s important to regularly carry out functional unit testing in your #QA process so that all these processes deliver expected outcomes continuously.

SAP teams are under increasing pressure to deliver business software enhancements faster and faster. Despite these increasing demands, SAP functional testing is still too often done manually.

What are the benefits of automating SAP tests?

👉🏻 Reduce maintenance. Easily create and maintain functional scenarios of SAP GUI usage after the development or modification of business rules or customers’ ERP system functionalities. Forget about flaky tests.
👉🏻 Improve test coverage. Add depth to your tests by replaying them on extended data to cover complex user paths with multiple data, on multiple devices and with multiple navigators.
👉🏻 Limit regressions. Regression tests are great when they identify issues before a production build. But there's nothing more frustrating than a test suite that throws constant false positives — or tests that fail when they should pass.
👉🏻 Save time and money. Reduce the time and cost of writing tests by pooling functional test modules. Create complex and scalable automated user interface tests.

-----

Thread [on Twitter.](https://twitter.com/agilitest/status/1578037354887278594?s=20&t=c6VZYMbyH5uz67AN2gQZlA)

-----

📚 𝕊𝕠𝕦𝕣𝕔𝕖𝕤:
🦅 https://agilitest.com/technology/sap-testing
🌐 https://guru99.com/learn-sap-testing-create-your-first-sap-test-case.html
🌐https://blog.qasource.com/a-complete-guide-to-sap-testing
Written Updatez
Published: 2023-01-30 08:28:24

[**Written Updatez**](https://www.writtenupdatez.com/) is a site where you get complete Biography of any famous **Pakistani**, **Bollywood**, **Punjabi **and **Hollywood ****Celebrities **and **Social Media Stars**. On this site you get all information about upcoming, latest and old Dramas of all **Pakistani Television Channels**. Like **Geo TV**, **Hum TV**, **ARY Digital** and Others. It uploads the information of upcoming and latest **movies details** with complete **casts & crew**, movie box office collection, reviews, release date and more.

It also uploads the **[song lyrics of Pakistani Drama OST Songs](https://www.writtenupdatez.com/search/label/OST%20Songs)**, Indian Songs, Punjabi Song and English Songs with multiple language lyrics. This is the paragraph which Written Updatez uploaded in its search section"We provides you daily updates about Bollywood Hollywood upcoming movies songs lyrics, Pakistani dramas details and all about Technology in one click."

At **[writtenupdatez ](https://www.writtenupdatez.com/)**you can get all the information of Geo TV, Hum TV and ARY Digital dramas and OST Title Songs lyrics in Hindi, Urdu & English. You can also get Mp3 audio of any songs.
How to install Minikube on Ubuntu
Tags: kubernetes, minikube, ubuntu
Published: 2023-01-30 08:06:19

If you tried surfing the internet with the hope of finding how you can install minikube so you could run kubernetes locally, you might not find a complete approach on how to do that. This post guides you through what you need installed before you finally install minikube.

1. You will need to update and grade your system.

```
sudo apt-get update && sudo apt-get upgrade -y
```
The -y allows the update without your prompt.

2. Install socat, conntrack and apt-transport-https for networking between clusters
```
sudo apt-get install socat apt-transport-https conntrack
```

3. Install curl if you don't have it
```
sudo apt-get install curl
```

4. Minikube needs a driver to run your cluster, it might be docker engine (container-based) or a virtualbox (Vm-based). This guide tells you how to install virtual box. You would still need to install docker engine as the runtime for your clusters anyway, so you might just want to install only docker engine using this [link](https://docs.docker.com/engine/install/ubuntu/).
```
sudo apt install virtualbox virtualbox-ext-pack
```
Follow through and complete the installation of virtual box.

5. Finally, install minikube
```
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
```

6. Test your installation.
```
minikube version
```
Today's Fun Joke For Developers - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2023-01-30 08:00:07

---
title: "Today's Fun Joke For Developers - Daily Developer Jokes"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e125933e8609.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ What did the fruit basket say to the developer?

___A:___ I hope you're ready for some pear programming!
 -->
Determine the Git Branch You're On
Tags: git
Published: 2023-01-30 08:00:00

---
series: Git Weekly
---

Branching is one of the most used features of git. People usually change branches all the time and need to determine which branch are they on, constantly.

## Use Branch Command

The first git subcommand that deals with branches is the branch command. Just by writing this command down, a list of all your local branches and the branch you are on will be shown. Enter:

```shell
git branch
```

And the output will be something like this:

```
  aerabi/add-readme
  aerabi/add-github-actions
* master
  the-hotfix-branch
```

Your current branch is highlighted with an asterisk and a different color.

## Use Status Command

The status command is a widely used powerful command that shows your current branch among other things. Enter:

```shell
git status
```

And the output will be something like this:

```
On branch master 
Your branch is up to date with 'origin/master'. 
 
Changes not staged for commit: 
  (use "git add <file>..." to update what will be committed) 
  (use "git restore <file>..." to discard changes in working directory) 
        modified:   docker-compose.dev.yml 
 
Untracked files: 
  (use "git add <file>..." to include in what will be committed) 
        .idea/ 
        Dockerfile 
        docker-compose.override.yml.bak 
 
no changes added to commit (use "git add" and/or "git commit -a")
```

The first line shows which branch are you on. The second shows your upstream branch if there are any set.

## Use Your Bash Configurations

This part works for Bash on Debian-based Linux distributions like Ubuntu.

I am using bash on Ubuntu. When I’m on a directory, my bash will show me something like this:

```
mohammad@pc:~/Dev/my-git-project$ 
```

So, all the time, I know which user account I’m using, on which host, and where on that host. It would be also very useful if your git branch would show up additionally. For it to happen, open your `.bashrc` file using your editor of choice:

```shell
vim ~/.bashrc
```

And add the following line to the end of the file:

```bash
PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\e[91m\]\$(__git_ps1 ' [%s]')\[\e[00m\]\$ "
```

Save and exit. Now, open a new terminal (or type `source ~/.bashrc`) and the git branch will show up whenever you’re in a git repository:

```
mohammad@pc:~/Dev/my-git-project [master]$
```

## Conclusion
Try to configure your shell to show the git branch, it saves you a lot of time.

This article was originally published [on Medium](https://medium.com/itnext/git-determine-branch-95714bcc99ab). I write weekly on git and monthly on Docker:

- [Subscribe to my Medium publishes](https://medium.com/subscribe/@aerabi),
- [Follow me on Dev.to](https://dev.to/aerabi),
- [Follow me on Twitter](https://twitter.com/MohammadAliEN).
AWS EBS Default Encryption:
Published: 2023-01-30 07:40:15

- By default, EBS volumes are plain text. 
- EBS encryption happens at EC2 host instance.
- EBS supports only symmetric KMS keys (Same key is used for encryption and decryption).
- This flag is super helpful to help maintaining data encryption at rest/in transit policy for all EBS volumes, especially if there are multiple implementation teams. 
- This option will force EBS encryption using default encryption key (AWS managed key: aws/ebs) that chosen while enabling it, of course you can choose your own customer managed keys. 
- If AWS managed key is selected, you will only be charged for API requests not key creation.
- In case there’s a specific encryption requirement (using other key), Default EBS encryption can be overridden at EC2 creation time.
- This feature is regional; meaning you have to enable it separately in each desired region.
- To enable EBS Default Encryption the process is very straightforward:

1. Navigate to EC2 dashboard and to your right you will find EBS encryption under Account attributes as shown below:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/knn4ucs4eyz23544mm29.PNG)
2.	Select enable > select desired encryption key> update EBS encryption

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uc2lpomb6sq6s664rgof.PNG)

References:
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html
Blazor Server Dll loading progress
Published: 2023-01-30 07:05:45

I have a blazor project. At application startup it loads a lot of Dll files. During this time window, nothing is shown on the browser. The page is blank with loading progress circle running on Chrome. When all dll and javascript scripts are loaded, the the application route starts and someting appears on the browser screen.
How is it possible to show the progress of loading project on a Blazor Server application? I found many articles that explain this matter but only for Blazor Webassembly projects, while none for Blazor Server projects.

Thanks in advance
Paolo
Digital Marketing course in Guwahati with 100% Internships & Job Assistance
Tags: digital, marketing, course, guwahati
Published: 2023-01-30 06:40:22

## Digital Marketing course in Guwahati with 100% Internships & Job Assistance 

**HIGHLIGHTS OF OUR DIGITAL MARKETING TRAINING COURSE IN GUWAHATI:
**Interactive Sessions
We conduct training in batches with not more than 20 members each, this allows the trainer to pay individual attention to every individual, allowing more interactive and attentive Digital Marketing Training sessions. 

Expert Trainers
We have a highly skilled  team of expert trainers with a proven track record of excellence and experience in their jobs.

**Free Course Material
**A free Digital Marketing course material will be provided to our students to revise and brush up on their coursework.

**Real Time Training
**You read, you remember. You listen, you learn. You practice, you master. We train you on real-time projects to give you enough practice and perfection in the course.

**Certification Guidance
**On clearing our internal certification test we certify you as a Professional Digital Marketer along with support to clear the Google Certifications that can make you a preferable candidate for companies.

**Paid Tools Access
**Tools fuel growth in Digital Marketing. Only the right tools can help strategize your marketing plan and we will provide you access to the best paid-tools that top digital marketing companies use for their business. 

**Success Strategies
**Our trainers share valuable insights on the secrets and untold strategies that can be implemented on real-time projects and businesses. 

**Batch Repeat Facility
**Learn till you master. In case you missed a session or couldn’t pick up on a few concepts, you can always attend our sessions multiple times for free of cost.

**Placement Assistance
**We will back you up in your journey to start a career in Digital Marketing along with – Free mock interviews + internships + resume preparation + recommendation to the top companies.

https://digitallearnopedia.com/
Best CA Course in the Dwarka
Published: 2023-01-30 06:28:50

Are you looking for [CA](https://adhyayanamacademy.com/chartered-accountant/), CSEET, [CMA](https://adhyayanamacademy.com/cost-management-accounting/) & [CSE ](https://adhyayanamacademy.com/civil-service-exam/)(IAS) courses in Dwarka? If so, Adhyayanam Academy is the ideal choice! With their experienced teaching staff and state-of-the-art facilities, Adhyayanam Academy has earned a reputation as one of the best academies in Dwarka for these courses. Whether you’re a beginner or an experienced student, Adhyayanam Academy can offer you the quality learning experience that you’re looking for.
How to make a Virtual Environment in Python for your projects
Tags: webdev, beginners, tutorial, python
Published: 2023-01-30 06:00:47

In order to make a virtual environment for your python project, you can use the venv module which is built-in to python.

Here are the steps you need to follow:

## Open command prompt

To open command prompt, press the home button on your keyboard, search for it, and press enter.

## Create a directory for your python project

The virtual environment needs to be in the same folder as your python project. In order to create a folder for your project in command prompt, you can run the following command:

```console
> mkdir pythonproject
```

where `pythonproject` is whatever you want to name your python project.

After running the above command, you need to go inside the `pythonproject` folder you've just created. To do this, you can run the following command:

```console
> cd pythonproject
```
where `cd` stands for "change directory"

## Create the virtual environment

We can now create the virtual environment by running the following commands

For Windows:

```console
> py -m venv envname
```

For Linux:

```console
$ python3 -m venv envname
```

where `envname` is your name of choice for your virtual environment.

## Activate the environment

Run the following code to activate the virtual environment:

For Windows:

```console
> envname\Scripts\Activate
```

For Linux:

```console
$ source envname/bin/activate
```

If you've done everything correctly, you should see the name of your virtual environment in brackets, in front of your current directory in your command prompt.

![virtual environment active](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3t8196bxjg7xue3udmqj.png)

The above image shows that you've successfully created the virtual environment and it is active.

Another thing you'd notice, is that if you open `pythonproject` (your project folder) in file explorer, inside of it, there would be another folder named `envname` (the name of your virtual environment).