teleren/devto huggingface dataset:
Deep dive into Data Structures & Algorithms.
Tags: python, algorithms, leetcode
Published: 2022-06-28 09:52:21

In this article, we will discuss about the data structures and algorithms in the Python programming language. The common data structures in python include:

- Lists
- Sets
- Tuples
- Dictionaries

## Lists
A list is used to store one or more python objects or data types. Lists are commonly enclosed within square brackets([]) and elements are comma separated. List has some methods which include list.append(x),list.insert(i,x),list.remove(x), list.count(x), list.index(x) just but to mention a few.
Below is an example of list.

```
>>> months = ['January', 'February', 'July', 'June']
>>> months.count('July')
3
>>>months.index('February')
1
```
 Also one thing to note is that Lists are mutable.

## Sets
It is a type of data structure that contains a collection of unique elements. It uses hash to improve performance. Indexing is not supported in this of data structure. It is also mutable, meaning it can be changed once declared. Are denoted by the use of curly brackets({}). N/B To create an empty set you have to use set() and not {}, since the latter will create a dictionary.

```
>>> days = {'monday', 'tuesday', 'wedenesday', 'thursday', 'monday'}
>>> print (days)
{'monday', 'tuesday', 'wedenesday', 'thursday'} # duplicates have been removed
```

## Tuples
A tuple built in data structure that contains ordered collection of objects.They come with a limited functionality than lists.
The distinguishing part between tuple and list the mutability aspect in that, tuple are immutable i.e they can not be changed once declared, while list are mutable. They are denoted using parenthesis(), and are separated by comma.
AN example of a tuple is :

`tuple = (item 1, item2, item3).`
_
Application of tuple._
-Tuples are used the user does not want to modify data.
-When you want use less memory and execute program faster.

## Dictionaries
Also a built in data structure, sometimes referred to other languages as associative arrays or associative memories. Dictionaries are indexed by keys, which can be any immutable type; strings and numbers can always be keys.
They are always denoted as key:pair value. Dictionaries are mutable, in that you can insert or delete entries in them. While deleting an item in the dictionary, you use the "del" keyword.
Illustration

```
>>> tel = {'alvin': 4098, 'stela': 4139}
>>> tel['moreen'] = 4127
>>> tel
{'alvin': 4098, 'stela': 4139, 'moreen': 4127}
```
To learn more about data structures in python, kindly refer here [](https://docs.python.org/3/tutorial/datastructures.html)
Spotinsta
Tags: spotify, instagram, webdev, php
Published: 2022-06-28 09:48:58

The code that writes the song you listen to on Spotify in the Instagram bio
Github Link => [https://github.com/suphiyasin/Spotinsta](https://github.com/suphiyasin/Spotinsta)
Screenshot
![Screenshot from spotinsta](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwdx7sxxqyu508ukkncu.png)
Improve your routine as a Developer
Tags: flutter, react, design, code
Published: 2022-06-28 09:42:23

Hi folks,

I have been thinking of starting a series on how to reduce a developer's mundane tasks. These tasks include writing the same old CRUD APIs, testing, applying validations, converting designs of Figmas to code, and so on.

Automation is emerging nowadays, and developers are automating all most everything for people around the world, so why not automate some tasks for themselves as well.

Let’s begin with “Design to Code”.

If you are a Mobile or a front-end Developer, You must have this process flow at your organization that A designer gives you Figma/Sketch/XD/PSD files of the application and then the developer converts it into say React, Flutter, Android, etc. Which takes a few days and even weeks.

Now Imagine…

What If you don't need to code for UI screens and you can directly code for the Data Manipulation (say for API Integration) part of your application?

WAITTT…Stay there and imagine more, What If you can integrate APIs into the screens as well. (There are so many things like this that I will cover in this blog)

Amazing, right!🤩️

Well, it's actually possible. You can do it with a few clicks.

Here’s your Everyday Friend DhiWise who does out-of-the-box things for frontend and Mobile Developers. Dhiwise converts Figma/Sketch/XD designs to UI code.

![Magic!](https://cdn-images-1.medium.com/max/2880/1*Tfvaur5LZ0wB4c1YBzFr1w.gif)

Features of Dhiwise — Design to Code 🚀️

 1. Component Identification and Updation

 2. API Integration

 3. Authentication

 4. Firestore and Supabase Integrations

 5. Validations on text fields

 6. Navigation and Code Preview

 7. Lifecycle Method setups

 8. Create Actions

 9. Setup App Drawers

 10. Manage Alerts

I will write a detailed Blog on each feature mentioned above. You will surely love it.

So…Stay Tuned and Follow me 😉️
>  Forget doing repetitive tasks ever again when you can convert your design-to-code with [DhiWise ](http://www.dhiwise.com?utm_campaign=blog&utm_source=devto&utm_medium=cms&utm_term=education&utm_content=devroutine)— The fastest way to build Enterprise-grade apps. [Sign up](http://app.dhiwise.com/sign-up?utm_campaign=blog&utm_source=devto&utm_medium=cms&utm_term=education&utm_content=devroutine) & build **Flutter**, **iOS**, **Android**, & **React** apps **for free!**

Also, I have already written a Blog on [Testing Automation](https://dev.to/saloni137/how-to-automate-api-testing-using-postman-3067). Do check it out.

**About Me:**

I am a Javascript Developer at **[DhiWise](http://www.dhiwise.com?utm_campaign=blog&utm_source=devto&utm_medium=cms&utm_term=education&utm_content=devroutine).** It’s a pro-code devtool that generates production-ready code for 6 technologies/frameworks. Check it out if you are a tech-geek 😋️

You can find me on [LinkedIn](https://www.linkedin.com/in/saloni-saraiya/) and we can talk about cool devtools like the one I am developing.

Keep coding👩‍💻️, keep automating. Bye. 👋️
Are Most Rust Jobs In Crypto?
Tags: rust, webscraping, jobs, data
Published: 2022-06-28 08:15:46

[Are Most Rust Jobs In Crypto?](https://scrapingfish.com/blog/are-most-rust-jobs-in-crypto)

Rust is a relatively new programming language without established and highly developed job market yet. Being developer's [the most loved language](https://insights.stackoverflow.com/survey/2021#technology-most-loved-dreaded-and-wanted) though, many people would like to have a full-time job using it. There's a [prevalent](https://www.reddit.com/r/rust/comments/usu4jr/why_most_rust_jobs_are_in_blockchain/) [feeling](https://www.reddit.com/r/rust/comments/tt2bbv/are_there_any_remote_noncrypto_rust_jobs/) among Rustaceans that most of the Rust jobs out there involve blockchain tech. Indeed, anyone who was ever seeking for the job in Rust surely stumbled upon a cryptocurrency job offer. Is it really true that most offers are in crypto? We have scraped job ads to find the answer!
Today's Daily Humor For Devs - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2022-06-28 08:00:20

---
title: "Today's Daily Humor For Devs - 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/5e125925337e5.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:___ Why did the constant break up with the variable?

___A:___ Because they changed.
 -->
A good alternative to stop using Google Analytics
Tags: discuss, solomaker
Published: 2022-06-28 07:57:13

When I shared my [solo developer stack to build a SaaS](https://dev.to/victoor/my-solo-developer-stack-to-make-a-saas-5ea3) some people have complained about Google Analytics due to privacy issues, and they are right.

I want to replace it and stop using it but, **do you know any good free alternative?**
Hire vetted quality Hyperledger developers within 48 Hours | Optymize
Tags: hyperlegder, develo, webdev, programming
Published: 2022-06-28 07:40:38

Fortune 500 companies and funded startups pick Optymize’s Hyperledger developers to scale up their teams quickly and to achieve their project deadlines. Extend your technology team and select the top 5% Hyperledger developers on contract basis. Optymize is a marketplace for top Hyperledger developers, programmers, consultants pre-vetted by our experts and our Talent Cloud Solution.

**Hire Developers Now**
100% risk free 2 weeks trial

**Click on:** https://optymize.io/hire-hyperledger-developers/


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9fe8dm4xtg5xmljr4g5m.jpg)
**Trusted By**

Our platform focuses on making the remote hiring process easier by providing top quality vetted engineers from around the world. Through our service many well-known companies have scaled their product development team.
How quickly can I hire and get a Hyperledger developer working?
You can get matched with a Hyperledger developer within 48 hours of the call with our Director of Engineering. After this process, it is upto you how quickly you can finish the interview and onboard the developer. On average, Optymize’s freelancers start working within 3-5 days of being matched. As these top developers are always in high demand and getting interview requests from multiple clients, we recommend to finish interview and onboarding process within 5 days.
Hire vetted quality DevOps developers within 48 Hours
Tags: devops, webdev, javascript, programming
Published: 2022-06-28 07:38:57

Fortune 500 companies and funded startups pick Optymize’s DevOps developers to scale up their teams quickly and to achieve their project deadlines. Extend your technology team and select the top 5% DevOps developers on contract basis. Optymize is a marketplace for top DevOps developers, programmers, consultants pre-vetted by our experts and our Talent Cloud Solution.

**Hire Developers Now**

**100% risk free 2 weeks trial.**
**Click on:** https://optymize.io/hire-devops-engineers/

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2g12k5mgebk2rrzypqaz.jpg)
Why choose DevOps for your project?
DevOps is the combination of cultural philosophies, practices, and tools that increases an organization’s ability to deliver applications and services at high velocity. It removes the organization’s traditional software development and management system by evolving and improving products at a faster pace. This speed enables organizations to serve their customers in a better way and compete with others more effectively in the market.
Why DevOps matters?
Software and the Internet have transformed the world and its industries, from shopping to entertainment to banking. Companies interact with their customers through software. In today’s world, companies must transform how they build and deliver software to meet the high demands.
DevOps Approach is based on:
      –.  Continuous Integration: It is a software development that involves continuous integration of code into the central repository
      –.  Continuous delivery: In this process of software development code changes are automatically built, tested, and prepared for a release to production.
      –.  Microservices: It is a design approach to building a single application as a set of small services.
      –.  Infrastructure as code: In this practice, infrastructure is provisioned and managed by using code and software development techniques such as version control and continuous integration.
      –.  Communication and collaboration: it is one of the key approaches of DevOps.
Benefits of DevOps
      –.  Speed: Moving at high speed will help to adapt to customer query, understand the changing market better, and grow more efficiently with productive results.
      –.  Rapid Delivery: Frequent release of new features and bug fixing will make the customer respond in a positive way which will help in innovation of the product.
      –.  Reliability: Delivering quality updates will ensure positive reviews from end users keeping the reliability factor intact.
      –.  Security: Automated compliance policies, configuration management technique will preserve security.
      –.  Scale: Automation and consistency help you manage complex or changing systems efficiently and with reduced risk.
      –.  Improved collaboration: Combine workflows of developers and operations team reduces inefficiencies and saves time.
Hire vetted quality Solidity developers within 48 Hours
Tags: solidjs, webdev, programming, devops
Published: 2022-06-28 07:35:45

Fortune 500 companies and funded startups pick Optymize’s [Solidity developers](https://optymize.io/hire-solidity-developers/) to scale up their teams quickly and to achieve their project deadlines. Extend your technology team and select the top 5% Solidity developers on contract basis. Optymize is a marketplace for top Solidity developers, programmers, consultants pre-vetted by our experts and our Talent Cloud Solution.

**[Hire Developers Now](**https://optymize.io/hire-solidity-developers/**)**

100% risk free 2 weeks trial.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ap0gfcu45ftn3vm2a3ym.jpg)
Click on: https://optymize.io/hire-solidity-developers/
How are Optymize Solidity Developers different?
At Optymize, our specialised team of technical experts assesses Solidity Developers through a rigorous vetting process including customised coding tests designed specifically based on your requirements to make sure you get only the right talent. Potential candidates are then tested for communication skills and team dynamics to ensure we only match you with talent of the highest calibre. Adding a top Solidity Developer with excellent communication skills and who is also a team player will increase team output substantially. We believe in providing top quality Solidity Developers only.
Why the .current in useRef variables?
Tags: react
Published: 2022-06-28 07:14:29

When you declare a useState variable like this:
`const [stateTitle, stateTitle_set] = useState('Hello State World!');`
when you need to use it, in JSX for example, you just enter the name of the variable.
`<h1>{stateTitle}</h1>`

But when you declare a useRef variable like this:
`const refTitle=useRef("Hello Ref World!");`
every time you use that variable, you have to add in the `.current` suffix.
`<h1>{refTitle.current}</h1>`

I don't see how it is possible to use the name of the reference variable _without_ the `.current` suffix. And the `.current` is the only suffix I see suggested by intellisense, so I don't see what other suffix might replace it. 

In conclusion, I don't see why React can't just understand that `refTitle` means `refTitle.current`. Why you can't just write:
`<h1>{refTitle}</h1>`
CSS Battle: #4 - Ups n Downs
Tags: css, webdev, beginners, tutorial
Published: 2022-06-28 06:56:06



In this article, I will solve a [Ups n Downs](https://cssbattle.dev/play/4) CSS Challenge on [CSS Battle](https://cssbattle.dev/). Let's look at the [problem](https://cssbattle.dev/play/4) first.

## Problem 

We need to create the following container by using CSS Properties only:
![Ups n Downs](https://cssbattle.dev/targets/4.png)

## Solution

So now look at the Solution and how we are going to achieve this. 

### HTML


<CodeTitle title="index.html" lang="html"/>
```html
<p class="left"></p>
<p class="middle"></p>
<p class="right"></p>
```

### CSS

Now let's style the containers. 

<CodeTitle title="styles.css" lang="css"/>
```css
body {
  margin: 0;
  background: #62306d;
}
.middle,
.left,
.right {
  position: absolute;
  background: #f7ec7d;
  width: 100;
  height: 100;
  border-radius: 10rem 10rem 0 0;
  margin-top: 50;
}
.middle {
  left: 150;
}
.left,
.right {
  transform: rotate(180deg);
  bottom: 34;
}
.left {
  left: 50;
}
.right {
  right: 50;
}
```


>In CSS Battle you can use `100` instead of `100px`. You don't need to define `px` in CSS. However, if you are using `rem` or `%` then you need to pass them separately. That's why in the above CSS code there are no units mostly. For more info [visit here](https://cssbattle.dev/tips)  

## Codepen

{% codepen https://codepen.io/j471n/pen/NWjrqNL %}


## Alternate Solution

There could be many Alternative Solution I've used this one because of the less characters and simplicity.


### HTML

<CodeTitle title="index.html" lang="html" />

```html
<p l></p>
<p m></p>
<p r></p>
```

Here I am using `<p>` tag and inside them `l` stands for `left`, `m` stands for `middle` and `r` stands for `right`.

### CSS

<CodeTitle title="styles.css" lang="css"/>
```css
body{
  margin:0;
  background:#62306D;
}
p[m],p[l],p[r]{
  position:absolute;
  background:#F7EC7D;
  width:100;
  height:100;
  border-radius:10rem 10rem 0 0;
  margin-top:50;
}
p[m]{
  left:150;
}
p[l],p[r]{
  transform:rotate(180deg);
  bottom:34;
}
p[l]{
  left:50;
}
p[r]{
  right:50;
}
```


>Minify the code or CSS by using any [CSS Minifier](https://www.minifier.org/). It helps you to reduce the characters in the code that will increase score.


## Wrapping up

If you like this then don't forget to ❤️ it. And I'll see you in the next article. See you soon.
The Worst Programming Habit
Tags: codenewbie, programming, webdev, beginners
Published: 2022-06-28 06:52:05

The programming inside of you dies when you spend your life watching Tutorials, and you suffer in Tutorial Hell.

Many of you spend a great deal of time watching tutorials on YouTube, medium, and other websites in order to learn how to program, but the main thing you never learn is how to execute your own code after watching the tutorials only.

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

How do I learn to program?

Learning just a few concepts and then creating a project as a beginner will enable you to learn to program. Try to create something by yourself if you are only learning two.

Concepts. Learning new things, and building practical skills, is a better practice.

As soon as you begin to do good projects, you will discover that you are learning at a much faster rate.

How do I get out of it?

Here are the tips, so you can come back to your tutorial if you’re stuck in it and know how to get back here.

1. You know your stuff, but you cannot implement them in projects.

2. You get overwhelmed by making large-scale applications.

3. You cannot finish any project that you started.

Learn how to program; don’t learn how to code

It is a way to become a better developer if you learn to write a program and then build some projects, it builds your confidence level as well if you design, plan, code, and test yourself with the program it’s an awesome way to develop your skills.

Stop watching tutorials

Instead of watching tutorials, just clean your mind and start to focus on the project you are working on

Briefly go over design patterns

Patterns are really important for a developer’s design because they help them in creating an awesome and easier-to-understand project. A good pattern will help you focus on logic and make your project easier to understand.

Plan your project before you start coding

The first thing you should do is to think about the project you want to create and what are the components used for a project. Think about the user interface, moving parts, and other components to make the project work well. Think about the application you want to create, and use your knowledge to make the application work best. You should probably recheck and research the most essential things about it.

Start coding

The best way to learn is to create some project work, start coding, and have a look at your own work if you run into some errors, find out the solution in Google. This is the best way to learn about yourself and code yourself.
Get Git to remember passwords - git credential manager examples
Tags: git, cicd, devops
Published: 2022-06-28 06:50:02

Sometimes it's necessary to use password-based authentication via `https` when using remote repo.

When used in CI/CD pipelines, we need to do this non-interactively, and not expose password in the remote's URL.

To do this, we can use git's own [credential manager](https://git-scm.com/docs/git-credential).

Here are some examples to help us understand and use it.

- [TL;DR (Full Example)](#tldr-full-example)
  - [Setup](#setup)
  - [Add password, pull from repo](#add-password-pull-from-repo)
  - [Clean-up](#cleanup)
- [More Examples](#more-examples)
  - [Save credentials](#save-credentials)
  - [Get credentials](#get-credentials)
  - [Selectively remove credentials](#selectively-remove-credentials)

## TL;DR (Full Example)

### Setup

```bash
# Get a shell into git container
docker run --rm -it --entrypoint=/bin/sh alpine/git:v2.34.2

# Store credentials to file
git config --global credential.helper store
# Note: To store in memory (for 1 day)
# git config --global credential.helper 'cache --timeout=86400'

# Clean out existing credentials
rm ~/.git-credentials

# Force non-interactive mode
export GIT_TERMINAL_PROMPT=0
```

### Add password, clone from repo

Add password

```bash
git credential approve <<'EOT'
url=https://example.com/jsmith/testrepo.git
username=jsmith
password=abc123
EOT
```

Clone repo - no password asked / exposed 😉️

```bash
git clone https://jsmith@example.com/jsmith/testrepo.git
```

### Clean-up

```bash
rm ~/.git-credentials
exit
```




## More Examples

### Save credentials

```bash
git credential approve <<'EOT'
url=https://example.com
username=user0
password=0000
EOT

git credential approve <<'EOT'
url=https://example.com/test-group/test-repo1.git
username=user1
password=1111
EOT

git credential approve <<'EOT'
url=https://example.com/test-group/test-repo2.git
username=user2
password=2222
EOT
```

### Get credentials

```bash
git credential fill <<'EOT'
url=https://example.com/test-group/test-repo1.git
username=user1
EOT

git credential fill <<'EOT'
url=https://example.com/test-group/test-repo2.git
username=user2
EOT

git credential fill <<'EOT'
url=https://example.com
username=user0
EOT
```

### Selectively remove credentials

```bash
git credential reject <<'EOT'
url=https://example.com
username=user2
EOT

# Ensure it's removed - expect to error-out with "fatal: could not read Password for 'https://user2@example.com': terminal prompts disabled"
git credential fill <<'EOT'
url=https://example.com/test-group/test-repo2.git
username=user2
EOT
```