teleren/devto huggingface dataset:
Python map() function
Tags: python
Published: 2021-06-05 06:05:50

After looking into the [Python filter function](https://daily-dev-tips.com/posts/python-filter-function/), let's take a look at how the map works.

As we learned, the filter will return a section of the input based on certain criteria.

## Map() function in Python

Let's first have a look at the syntax:

```python
result = map(myFunction, input)
```

To give more details to this:

- `result`: Is the output. This will be a changed sequence.
- `filter`: Is the Python built-in function
- `myFunction`: This will be a custom function we are going to build
- `input`: This is the original sequence we want to map

As you can see, the syntax looks like the filter function. The main change will be inside the `myFunction`.

Let's say we have a list of numbers that we need to multiply by themselves.

```python
input = [2, 5, 10]

def myFunction(n):
    return n * n

result = map(myFunction, input)
print(list(result))

# [4, 25, 100]
```

Pretty cool right, and like the filter one, we can use [Lambda functions](https://daily-dev-tips.com/posts/python-lambda-functions/) to make it even shorter.

```python
input = [2, 5, 10]

result = map(lambda n: n * n, input)
print(list(result))

# [4, 25, 100]
```

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
I changed my master passwords (and thoughts)
Tags: security, password, discuss
Published: 2021-06-05 06:00:05

Trick is, use TWO password managers

- First one is server-based BitWarden
- Second one is file-based KeePassDX, with passphrase generator (actually, I tweaked this myself)

Then, use the passphrase generator in second password manager, BUT DON't use it directly.

Instead, modify the passphrase, or make variations to your likings; so as to make more memorable and funny. (Then store all master password variations.)

I do have a question, though.

> How long should MASTER password, that you type in (not copy) often, be?

Next step, is generating PINs, probably - this one is also highly reused.
How to Retry HTTP Request unitl There is a Result in Laravel
Tags: laravel
Published: 2021-06-05 05:46:45

There are certain operations that can have a high probability of failure. For instance, sending a request to a third-party API. You’re not sure whether it will work every time flawlessly because it’s not in your control. If the API endpoint you’re hitting is not responding, you might end up with an exception straight away.

I’m sure we all don’t want that to happen. So, what would you do in such a scenario? You’ll “retry” the same operation, no?

Well, if your application is built on top of Laravel, there’s a really handy helper function that exists in the framework which can help you do just that.

The retry helper function
Essentially, retry is a general-purpose helper function that helps you attempt the given callback until the given maximum attempt threshold is met.

Here’s the signature of this function.

function retry($times, callable $callback, $sleep = 0, $when = null);

As you can see, the function accepts four arguments.

$times - The maximum number of times you want to attempts the callback.
$callback - The callback that you want to get retried (on an exception).
$sleep (optional) - The number of milliseconds that Laravel should wait in between attempts.
$when (optional) - The callback where you can specify an alternative logic (a predicate) on which you want the original callback to be attempted.
So, if you want to perform an API call that you want to be retried (on failure) 3 times every 200 milliseconds, you can use the retry function like so.

[How to Retry HTTP Request unitl There is a Result in Laravel](https://www.amitmerchant.com/retry-operations-with-high-probability-of-failure-in-laravel/)
Back To The Past With Ghost Train Online Slot
Published: 2021-06-05 05:42:13

The latest new release at Omni Casino is titled Ghost Train Fairground Fortunes. If you have visited a country fair in your younger days you may recall riding in a toy train that passes through a tunnel where there are spooky sights and sounds. The online slot is based on this theme. Ghost Train Fairground Fortunes has been developed by Ash Gaming for release at Playtech powered ☞  <a href="https://www.topseom114.net/" target="_blank" title="바카라사이트">바카라사이트</a>.

Ghost Train Fairground Fortunes online slot has the standard 5 reels and 3 rows structure with 20 fixed paylines. The background to the reels is dark and dingy but the symbols are bright and cheerful. These include the game logo, ghost, monster mask, toy station and the usual playing card icons. The coconut is the scatter symbol and awards payouts multiplied by the total bet. It has probably been taken from the coconut shy, which is another popular fairground attraction. You have a personified coconut sitting outside the reels, which may randomly throw a ball on the reels turning symbols into scatters. The set of skulls is the wild symbol. Keep in mind that even the line wins are multiplied by the total bet and not the line bets as is usual. Therefore the multipliers in the payout table are seemingly lower than normal.

The Ghost Train feature is triggered when the engine lands on reels 2, 3 and 4. It is a bonus game on the second screen. You take a ride on the cash train. You will win a cash bonus for every monster you meet during the ride. After the ride is over, you will be given a ticket. This will either end the bonus game or will give you another ride on the cash train. If you have triggered the Ghost Train feature with at least one gold engine then you will get at least three rides. Ghost Train Fairground Fortunes also includes a free spins feature that is triggered by the bat symbol landing on reels 1, 3 and 5. You are awarded 10 exciting and lucrative free spins. 30 paylines are added to the reels so the free spins are played with 50 paylines. The free spins can be retriggered unlimited times.

Ghost Train Fairground Fortunes has not yet made it to the top ten most played games at Omni Casino. The top spot is occupied by the branded online slot Dirty Dancing. There are quite a few Age of the Gods slots in the top ten like God of Storms, King of Olympus, Goddess of Wisdom.
I made a new JavaScript operator!
Tags: javascript
Published: 2021-06-05 05:38:16

Can you figure out how?

```js
let x = 10;
// The new arrow operator – goes from one number to another
while (x --> 0) { // x goes to 0
  console.log(x)
}
```

{% runkit %}
let x = 10;
// The new arrow operator – goes from one number to another
while (x --> 0) { // x goes to 0
  console.log(x)
}
{% endrunkit %}
Dapatkan Penghasilan setiap harinya
Published: 2021-06-05 05:22:17

Gimana sih car amendapatkan penghasilan setiap harinya hanya dengan dududk diam dirumah?
Silahkan ikutin tautan saya nih di blog saya di sana ada di jelaskan lo gimana cara mendapatkan penghasilan setiap harinya dan hanya dengan duduk dirumah saja.

Link blog : https://cuandiking.blogspot.com/

Ingat guys jaman sekarang sudah mulai digital nih jadi harus pandai menguasainya nih
What a great journey with Dev.to !!
Tags: devjournal, motivation, discuss
Published: 2021-06-05 05:14:55

Hey, there 👋,

Thank you for taking the time to visit. I hope you take a few minutes to read my articles; today marks the end of my one-month trip with dev.to, and I'd like to share my experiences with you. Thank you for taking the time to visit. I hope you take a few minutes to read my articles; today marks the end of my one-month trip with dev.to, and I'd like to share my experiences with you.

# ✋ A few lines about My Work and Me
My name is Rajesh, and I'm an Technology Specialist by day and a technical blogger by night. Knowledge sharing, open-source contributions, interacting with others, and mentoring are all things that I am enthusiastic about.

After spending a decade with software development and web programming, I finally got the wisdom 💡 to start my blog a couple of years ago as `DevelopersDiscussion.com` and thereafter I found a great dev community as `dev.to` and I started writing here as well, based on my efforts and consistency dev.to has promoted me with a badge and now I'm moderator as well. Believe me or not, blogging is one of the wisest decision I have taken so far. Sharing is indeed the best way to gain knowledge 👨🏻‍🎓.

I write articles on HTML, CSS, JavaScript, Angular, React, Node.js, XSLT, XML, AWS, Servers, CI/CD, Mobile Web Technologies,  Machine Learning, Software Development, Blogging, and Leadership. If you are interested in any of these, you may find my articles very useful. So please give it a try and follow me for updates.

You can read more about me at [RajeshKumarYadav.com](https://rajeshkumaryadav.com) and you can show your support as well.

# 🤝 Why do I need your Support?
First of all, Thank You very much 🙏 for reading, liking, commenting on my articles. The biggest motivation behind consistent content creation is `YOU`, my readers.

As you know, writing quality articles takes time and effort. Therefore, if you have enjoyed my articles or it was helpful to you, please consider showing your thanks by buying a coffee for me. It will surely motivate me further to write excellent content in the future 😊.

You Can click on the `Buy Me A Coffee` button at the bottom of the articles.
<a href="https://www.buymeacoffee.com/rkycom" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" ></a>

You can extend your support by following me on Twitter(@rky_com), 

🙏 Thank You
Thanks for sponsoring & supporting!
Weekly web development resources #76
Tags: weekly, webdev
Published: 2021-06-02 06:25:26



______

##[The Button Cheat Sheet](https://www.buttoncheatsheet.com/)
[![The Button Cheat Sheet](https://wweb.dev/weekly/content/76/button-cheatsheet.jpg)](https://www.buttoncheatsheet.com/)
A cheat sheet to help you with the right markup for buttons.

______

##[Awesome Privacy](https://github.com/pluja/awesome-privacy)
[![Awesome Privacy](https://wweb.dev/weekly/content/76/awesome-privacy.jpg)](https://github.com/pluja/awesome-privacy)
A big list of free, open source and privacy respecting services and alternatives to private services.

______

##[Helsinki Design System](https://hds.hel.fi/)
[![Helsinki Design System](https://wweb.dev/weekly/content/76/hds-building-blocks.jpg)](https://hds.hel.fi/)
An open-source design system for digital products and experiences.

______

##[Color Gradient](https://colorgradient.dev/)
[![Color Gradient](https://wweb.dev/weekly/content/76/colorgradient.jpg)](https://colorgradient.dev/)
A cool generator for various color gradients.

______

##[Just Code](https://justcode.today/)
[![Just Code](https://wweb.dev/weekly/content/76/just-code.jpg)](https://justcode.today/)
A website with CSS effects for image filters and for flat buttons.

______

##[Boring Avatars](https://boringavatars.com/)
[![Boring Avatars](https://wweb.dev/weekly/content/76/boring-avatars.jpg)](https://boringavatars.com/)
A tiny JavaScript React library that generates custom, SVG-based, round avatars.

______

##[NocoDB](https://github.com/nocodb/nocodb)
[![NocoDB](https://wweb.dev/weekly/content/76/nocodb.jpg)](https://github.com/nocodb/nocodb)
An open-source airtable alternative to turn SQL databases into smart-spreadsheets.

______

##[Unveiling Material You](https://material.io/blog/announcing-material-you)
[![Unveiling Material You](https://wweb.dev/weekly/content/76/material-you.jpg)](https://material.io/blog/announcing-material-you)
The new design approach by Google.

______

##[Harold](https://www.haroldjs.com/)
[![Harold](https://wweb.dev/weekly/content/76/haroldjs.jpg)](https://www.haroldjs.com/)
A static site generator that can help quickly set up static websites, blogs and documentation sites.

______

##[svg-loader](https://css-tricks.com/svg-loader-a-different-way-to-work-with-external-svg/)
[![svg-loader](https://wweb.dev/weekly/content/76/svg-loader.jpg)](https://css-tricks.com/svg-loader-a-different-way-to-work-with-external-svg/)
A Different Way to Work With External SVG.

______

##[How to Cleanup Async Effects in React](https://dmitripavlutin.com/react-cleanup-async-effects/)
[![How to Cleanup Async Effects in React](https://wweb.dev/weekly/content/76/async-effects.jpg)](https://dmitripavlutin.com/react-cleanup-async-effects/)
An article on how to handle common asynchronous side-effects in React.

______

To see all the weeklies check: [wweb.dev/weekly](https://wweb.dev/weekly)
Laravel Get Data Between Two Dates Tutorial

Tags: laravel, php, programming, tutorial
Published: 2021-06-05 04:35:37

<p>Hi Guys,</p>
<p>In this article let's see example of how to get data between two dates in laravel example. This is a short guide on laravel get data between two dates. Here you will learn get data between two dates laravel. We will utilizes get data between two dates in laravel. Let's get started with get data between two dates in laravel.</p>
more..

https://codingtracker.blogspot.com/2021/06/laravel-get-data-between-two-dates.html
How Can Games Help Programmers Be More Productive
Tags: devmeme, programming, gamedev, python
Published: 2021-06-05 04:26:45

#Hey There,
Tired and exhausted Dev's. I am Tirth here your one and only game blogger here. So today we are going to talk about a little bit off-topic by the way sorry for that. Ok, so I have a question?
So how can games help programmers be more productive??, you must be thinking that **(from your perspective)** wait what tirth you must be kidding right.
if you know anything else pls comment
No guys I am not joking here's your answer:

###Boost Learning and Memory:
A lot of video games require players to learn,memorize and apply various tricks.Player also beed to remember all the instructions given at the start of the game.So programers must be able to learn all the syntax and related sybols of the coding language.

###Improve Problem-Solving Skills:
A great problem solver can make critical decisions in a matter of seconds. In video games, decision-making is often cut down to seconds, and players must make full use of their brain power before proceeding to the next step.Each video game has rules guiding players on what to follow before executing the next move.
You can apply this skill to programming, where you are required to develop a software solution that will solve a real-world problem.

###Improve Multitasking Skills:
For example, if the game involves fighting, a player will have to keep monitoring the energy levels of fighters while simultaneously attacking enemies. Without excellent multitasking skills, one is highly likely to fall on the losing end.
Programming will also call for excellent multitasking skills to create solutions to real-world problems. Programmers must be keen and observant to whatever is taking place on their screen and must be able to write code while simultaneously checking for errors.

So, End of the day it's up to you i have only shown the benifits of gaming in programmers life it also has some cons just don't be be addicted to game it may effect your work.Play games for entertainment.

If you are still There then do like and follow my dev account i won't take a sec to do that and if you like gaming then do subscribe to youtube channel:
[My Youtube Channel](https://www.youtube.com/channel/UC1sE6NRQT5zbgzq9tRhQRlQ)
Completely Lost and Need (General/Career) Advice
Tags: help
Published: 2021-06-05 03:56:22

## A bit of how I got into this mess...

I've been avoiding writing, or reaching out to any boarder tech community. It's mostly informed out of a fear of toxicity, which I've previously received from such communities. Mental health issues has caused me to become something of a social recluse over the course a short job followed by university.

This is a nerve racking attempt to try and get some idea or direction to eventually get me in a better place.

I've enjoyed doing some web work, but it is a far cry from a real job. The college work I've done in computer science, no surprise was not helpful in the slightest to me. Fun concepts and ideas though. I've had vague musings with games, but I haven't the heart to work in that industry.

I know portfolio/profile building is important, but I've no idea of what projects I should do or what direction I should take it. Many good tutorials abound, but without something to call my own I can't really demonstrate that I know a technology. I seem to lack a necessary creativity, as I've not really anything in my life to use as a basis for projects.

## Now for the questions:
- Should I do a project per technology?
- How can I better foster creative growth while having depression?
- How do I navigate the professional space as a trans person? Especially someone who needs to play it quiet around her parents?
- How can narrow my focus to more specific web technologies?
- I am a bit geographically constrained due to finances, how can I best handle this problem?
- Are there other questions I should be asking instead?

Please, if your answer involves "my interests" understand that I really don't have any. Also please refrain from this "culture of awesome" language, it's very demeaning and abrasive.

Thank you for reading, and especially my deep gratitude for any advice you may have.
::Before and ::After in CSS made easy
Tags: css, html
Published: 2021-06-05 03:50:14

Hello, People

Today we are going to learn about pseudo-elements, one of the most useful CSS properties.
Pseudo-elements in CSS allow us to add content to a page without adding additional HTML elements.
Seems confusing? Okay, in simple terms.

<blockquote>Pseudo-elements are like a shadow, which can be seen but not able to touch.</blockquote>

I can assure you that if you master these topics, you will use them all over your project. Without wasting time let us dive in.

<h1 style="color: #022e57;">::Before</h1>
Before selector is used to position content before the content of the selected element.
### Syntax
We need to add the item with the keyword ::before with the required content property. The content can be any string or even blank.

```
     element::before{
      content: "";
     }

``` 
>Note: before and after pseudo-elements will not work without content property.  

### Example

{% codepen https://codepen.io/Archisol/pen/poeLzLR %}


<h1 style="color: #022e57;">::After</h1>
The after pseudo-element can be used to position content after the content of the selected element.
### Syntax

We need to add the item with the keyword ::after with the required content property.

```
     element::after{
      content: "";
     }

``` 

### Example
{% codepen https://codepen.io/Archisol/pen/JjWLPMZ %}

> Note: These elements are inline by default

I Hope, the blog was useful. If there are any queries feel free to ping me on <a href="https://twitter.com/DeRaowl">Twitter</a>. **Now as a task you can create the below image** using before and after pseudo-elements.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1622716152574/FjzGLaOXJ.png)

The solution can be found here <a href="https://codepen.io/Archisol/pen/QWpmLVK">Codepen</a>

For more about Pseudo Elements, refer below websites:

- <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-elements">MDN Web-Docs</a> 
- <a href="https://css-tricks.com/almanac/selectors/a/after-and-before/">CSS  Tricks</a>
Consistency is hard
Tags: blog
Published: 2021-08-18 05:07:26

---
title: Consistency is hard
published: true
date: 2021-06-05 03:46:12 UTC
tags: blog
canonical_url: https://germangamboa.com/posts/consistency-is-hard
---

![Picture of a brick](https://germangamboa.com/images/brick.jpeg)

# So we are halfway through the year

What has German done over the past six months.

Not a whole lot but at the same time a lot. I guess the best way to put it is I have done a whole lot of nothing.

What do I mean with that?

Well I have been working pretty hard over the past few months and have gotten a lot of "work" done. Which is awesome and if I was someone who was easily content with going to work and going home I would not be complaining. But there is more to life than just doing work for others. Which brings me to the part where I feel like I haven't done nothing.

I have not really worked on myself.

Now I don't mean "I haven't had time to relax or watch a sun set" or that other type of things. I mainly mean I haven't had time to work on my goals for this year. Which mind you are the same as every other year which to summerize is "Stop procrastinating".

Time management is hard for me to do.

_\*\*German gets distracted watching a video while writing this\*\*_

I mean in theory is not hard right?

You just make a todo list, then make a schedule then put those todo's into that schedule and off you go into productivity land.

Well that kind of works, sometimes... Well it works for like two days.

Being consistent with that is very hard.

Being consistent with pretty much anything is hard in general. Adding serious procrastination is just playing the whole thing in nightmare mode.

So what can I do about it?

_"Well just freaking do it dude" - The Internet_

You could say that it is all a problem about being disciplined ect. Which I guess is partly through but after knowing myself for the 26 years I know that is not the full story, at least for me.

After thinking about it for a while I know my reason for consistently failing to be consistent or procrastinate is just an intense anxiety due to the fear of failing.

I really don't think much of myself and most of the time I am amazed at how far I've made it. I'm usually just waiting for someone to find out I am a fraud or something. Its a pretty crappy feeling. I guess its easy for my brain to go:

_"You can't fail at something if you don't do anything"._

Which is something I need to work on. As to how? I have not the slightest clue but I will figure something out.

I always do, even if its at the last second.