teleren/devto huggingface dataset:
python and firebase auth Sign in anonymously
Tags: python, firebase, database
Published: 2021-09-27 23:39:06

Visit [Python firebase authentication Definitive guide (2021)](https://blog.icodes.tech/python-firebase-authentication.html) for more
### Sign in anonymously

Sometimes you need to use user's features without creating an account. So you can do it on firebase  just by sending another **POST** request to :

https://identitytoolkit.googleapis.com/v1/accounts:signUp

But You have to enable it first

![python firebase enable sign in anonymously](https://1.bp.blogspot.com/-6HoJsHJ_EBk/YTYizJfJ-iI/AAAAAAAAAaA/TO7Dg6yPDlgxbz5RNk9MaoEyMH6NhV6nQCLcBGAsYHQ/s987/imageedit_9_6641761152.webp)

Code :

    import requests
    
    apikey='...................'# the web api key
    
    def SignInAnonymously():
        headers = {
            'Content-Type': 'application/json',
        }
        data='{"returnSecureToken":"true"}'
        r = requests.post('https://identitytoolkit.googleapis.com/v1/accounts:signUp?key={}'.format(apikey), headers=headers, data=data)
        if 'error' in r.json().keys():
            return {'status':'error','message':r.json()['error']['message']}
        if 'idToken' in r.json().keys():
            return {'status':'success','idToken':r.json()['idToken']}

Output :

{'status': 'success',
 'idToken': 'eyJhbGciOiJSUzI1NiIsImtpZCI6IjkwMDk1YmM2ZGM2ZDY3NzkxZDdkYTFlZWIxYTU1OWEzZDViMmM0'}

Read more [Python firebase authentication Definitive guide (2021)](https://blog.icodes.tech/python-firebase-authentication.html)
Single feature app idea
Tags: projects, ideas, startup, decodingcoding
Published: 2021-09-27 23:32:51

---
title: Single feature app idea
published: true
description: Replace a single painful, repetitive editing task with a software product that does just that
tags: projects, ideas, startup, decodingcoding
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/np4nndj9bea68wlu49t1.jpg
---

Here's an idea for a side project: Take one painful, labourious, repetitive task on Photoshop/Indesign/Sketch/Final Cut Pro/any editing software for that matter, and make that into a product.

Like this nifty little remove.bg web app. I love it. Removing backgrounds can already be done in Photoshop for sure, but to do it well (especially removing background from hair), it does take some manual effort. And it’s a task that happens pretty often enough to feel quite repetitive, boring and simply an unproductive use of time after a while. Software automation is great for tasks of such nature - manual, labourious, simple-enough, repetitive, boring. 

I remember reading somewhere that Invision was built to facilitate client feedback, to make screen prototypes more shareable so that it’s easy for anyone (even non-designers) to comment. Imagine the loss of productivity from endless emailing of pdfs back and forth, versioning the different files each time - clientwebsite-final-final-final.pdf. Again, Invision replaces one repetitive, labourious and painful task of communication ping-pong into a product. Same with Google Docs.

This idea for a single feature app or software product sounds so simple, yet so difficult to practice because everyday routine and habit blinds us to opportunities like these. So this made me think: 

***What boring, painful and simple work tasks that we do repetitively and manually on a regular basis, can be replaced by automation/software?***

Let’s hear it!

---

Follow my daily writings on [Lifelog](https://golifelog.com/goals/30), where I write about learning to code, goals, productivity, indie hacking and tech for good.
jquery-text-wildcard-area: A jQuery plugin to add and remove wildcards
Tags: jquery, html, webdev
Published: 2021-09-27 23:13:18

> A jQuery plugin for textarea to add and remove wildcards from text

## Basic Usage

### Declare a textarea and declare a list of tags to use with UL LI

```html
 <textarea id="MyTextWildCardArea"></textarea>
 <nav>
    <ul data-toggle="tag" data-target="#MyTextWildCardArea">
        <li class="nav-item"><a class="tag tag--available" data-tag="[ExampleTag]" role="button">[ExampleTag]</a></li>
        <li class="nav-item"><a class="tag tag--available" data-tag="[Email]" role="button">[Email]</a></li>
    </ul>
</nav>

```

```js
$('#MyTextWildCardArea').textWildCardArea();
```


#### It is also possible to instantiate with many text areas.

```html
 <textarea id="TextAreaExample" class="my-textarea"></textarea>
 <nav>
    <ul data-toggle="tag" data-target="#MyTextWildCardArea">
        <li class="nav-item"><a class="tag tag--available" data-tag="[ExampleTag]" role="button">[ExampleTag]</a></li>
        <li class="nav-item"><a class="tag tag--available" data-tag="[Email]" role="button">[Email]</a></li>
    </ul>
</nav>


<textarea id="AnotherTextArea" class="my-textarea"></textarea>
 <nav>
    <ul data-toggle="tag" data-target="#MyTextWildCardArea">
        <li class="nav-item"><a class="tag tag--available" data-tag="[ExampleTag]" role="button">[ExampleTag]</a></li>
        <li class="nav-item"><a class="tag tag--available" data-tag="[Email]" role="button">[Email]</a></li>
    </ul>
</nav>

```

```js
$('.my-textarea').textWildCardArea();
```


### data attributes
* <strong>data-toggle="tag":</strong> Required: define the type tag for a element  
* <strong>data-target="#elementId":</strong> Required: define the target textarea to observer  

### classes
* <strong>tag tag-available: </strong> the plugin uses this class to control a toggle state. 
* <strong>tag tag-unavailable: </strong> the plugin uses this class to control a toggle state.  
At least one class is required 

The plugin doesn't have css styles, but this css can be useful for a basic style
```css
     .tag.tag--available {
        cursor: pointer;
        font-weight: 700;
    }

    .tag.tag--unavailable {
        cursor: pointer;
        font-weight: normal;
        font-style: italic;
        text-decoration: line-through;
    }
 ```


## Usability
* Click once for add wildcard to the textarea  
* Click once for remove all wildcards from the textarea  
* If a textarea already has data coming from the server, the plugin must observe and apply the toggle state on the tags

![Image of Example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xg6imx91zjoxhfrk42c7.png)

Code: https://github.com/raafacachoeira/jquery-text-wildcard-area
2021 DevRel Salary Survey results - Table of Contents
Tags: devrel, salaries, career, developerrelations
Published: 2021-09-27 23:11:48


The DevRel Salary Survey results are here from the <a href="https://devrelcollective.fun">Dev Rel Collective (DRC)</a>! They are split into sections for convenience.

Data scientist Greg Sutcliffe was invaluable in preparing, dissecting and modeling. If you would like to help spread the word, please consider including our hashtag #devrelsalarysurvey

[Introduction](https://dev.to/bffjossy/devrel-collective-2021-salary-survey-introduction-40j8)

Key Findings I: [DevRel Salaries by Country](https://dev.to/bffjossy/drc-survey-i-devrel-salaries-specializations-by-country-2m3) 
Key Findings II: [Fair Compensation](https://dev.to/bffjossy/drc-salary-ii-devrel-salaries-fair-compensation-aie)
Key Findings III: [DevRel Career Stages and Salaries](https://dev.to/bffjossy/drc-survey-iii-devrel-career-stages-and-salaries-3859)
Key Findings IV: [DevRel Job Titles and Salary](https://dev.to/bffjossy/drc-survey-iv-devrel-job-titles-and-salaries-oon)
Key Findings V: [DevRel Salaries and Gender](https://dev.to/bffjossy/drc-survey-v-devrel-salaries-and-gender-3i4g) 
Key Findings VI: [DevRel Salaries and Ethnicity](https://dev.to/bffjossy/drc-survey-vi-devrel-salaries-and-ethnicity-29on) 
Key Findings VII: [DevRel Salaries and Sexual Orientation](https://dev.to/bffjossy/drc-survey-vii-devrel-salaries-and-sexual-orientation-55cd)
Key Findings VIII: [DevRel Coders, DevRel Managers, and Salary](https://dev.to/bffjossy/drc-survey-vii-devrel-coders-devrel-managers-and-salary-15j)

[Conclusion and Takeaways](https://dev.to/bffjossy/drc-survey-ix-devrel-salary-takeaways-2021-3lp1)

Appendix A: [DevRel Salaries, Size of Company, and Trading Status](https://dev.to/bffjossy/drc-survey-appendix-a-other-plots-company-size-trading-status-and-regional-spread-569b) 
Appendix B: [DevRel Salary Survey Questions] (https://dev.to/bffjossy/drc-survey-appendix-b-devrel-salary-survey-questions-2ajm)

#####SPECIAL THANKS TO OUR DATA SCIENTIST, GREG SUTCLIFFE
######Greg Sutcliffe has been working in community management for a decade, and is currently the Principal Data Scientist for the Ansible Community. He's interested in how appropriate use of data can inform the development and governance of communities, especially with regards to open source projects. He also likes cooking.
jquery-file-viewer: An extensive jQuery Plugin for rendering files
Tags: jquery, html, webdev
Published: 2021-09-27 23:07:29

> An extensive jQuery Plugin for rendering files

## Basic Usage

Declare a div target

```html
<div id="foo" data-file-name="myFile.jpg" data-file-path="content\myfile.jpg" data-file-contenttype="image/jpg"></div>
```

```js
$('#foo').fileViewer();
```

It is also possible to instantiate with many divs.


```html
<div class="bar" data-file-name="myFile.jpg" data-file-path="content\myfile.jpg" data-file-contenttype="image/jpg"></div>
<div class="bar" data-file-name="anotherFile.mp3" data-file-path="content\anotherFile.mp3" data-file-contenttype="audio/mpeg"></div>
...
...
```

```js
$('.bar').fileViewer();
```


## Advanced Options

All options can be informed by html attributes or parameters options method or defaults ($.fn.fileViewer.defaults).

```js
$('.bar').fileViewer(
    filePath: 'content\myfile.jpg',
    fileName: 'myFile.jpg', 
    fileExtension: '.jpg', //optional
    contentType: 'image/jpg', //optional: If a contentType a not filled, it will be discovered by fileExtension
    generateId: true //Sets the id to element render, e.g: id="pdf-viewer"
);
```

## Changing defaults

It is possible changes all parameters on fileViewer plugin, even viewers properties or viewers templates


## Adding new viewer support

First, we make the viewer object

```js
$.fn.fileViewer.defaults.viewers.cad = {
    id: 'cad-viewer',
    class: 'cad-viewer',
    render: function (file) {
        return ''; /*Add here a Cad template render*/
    }
}
```

After, we making the map for extension file to match the new viewer
```js
$.extend($.fn.fileViewer.defaults.map.extension, { '.dwg': 'cad'}) 
```

(Optional) Also, it is possible makes the map with contentType
```js
$.extend($.fn.fileViewer.defaults.map.contentType, { 'application/acad': 'cad'}) 
```

## Browser Support

This library passed on tests in the IE11 Browser.

## License

[MIT License](https://github.com/raafacachoeira/jquery-file-viewer/blob/main/LICENSE) © Rafael Cachoeira


Code: https://github.com/raafacachoeira/jquery-file-viewer
Convert a Number or a String
Tags: react
Published: 2021-09-27 22:31:02

Hi everyone, I'm new to the "React" javascript framework to improve my skills, I gave myself as an exercise to convert a number or string into a symbol. For example a number will convert like this <D> and a string will convert like this <?L> I present to you my code that I was able to write to reach the end of my exercise on pastebin:
https://pastebin.com/uKeMM1zT

and here is the result I get in return
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/odwwe3vm27svw84h7sjw.PNG)

characters such as <?d> or <?L> do not appear as many times as the string inserted in the input

if I could get some help from the more experienced or someone who has any idea how to fix this it will warm my heart.
I've been looking for a solution on the internet for 3 days, but nothing solves my problem or maybe I'm not typing the right keywords.
let and const vs var scoping
Tags: javascript, tutorial, codenewbie
Published: 2021-09-27 22:00:36

Starting from ES6, `let` and `const` handle scoping differently from `var`. With `let` and `const` being available since ES6, you have no excuse to use `var` anymore!

You might have seen people mention that `let` and `const` are "lexically scoped", but what does that really mean?

In simple terms, it just means that the structure of your program itself shows where a scope begins and where it ends: opening a curly brace for a function creates a new scope, closing it ends the scope.

Here's an annotated code example that shows the differences between the two

```javascript
function foobar(x) { // Start of a scope
  if (x == 1) { 
    // Variables declared with `var` are "hoisted"
    // and initialized to `undefined`.
    console.log(foo); // undefined
    // `let` and `const` are hoisted too, but not 
    // initialized to `undefined`.
    console.log(bar); // Uncaught ReferenceError: bar is not defined

    var foo = "foo";
    let bar = "bar";
  }

  // `foo` is scoped to the function , so it's 
  // available anywhere in the function block
  console.log(foo); // "foo"
  // `bar` is scoped to a block, here `if (x == 1) {}`,
  // so when the block ends (after the `}`), `bar`
  // isn't available anymore.
  // Any pair of curly braces `{}` creates a new block.
  console.log(bar); // Uncaught ReferenceError: bar is not defined
}
```

---

Did you enjoy this blog post? Check us out on Twitter [@nspiredTech](https://twitter.com/@nspiredTech) for more tech content!
Day 460 : Runnin
Tags: hiphop, code, coding, lifelongdev
Published: 2021-09-27 21:47:03

_liner notes_:
- Saturday : Got up early to finish putting together the radio show. I got my new case for my phone. It's pretty cool. It has a stand that now I can view video with the screen unfolded. Pretty nice. I did some research on my new side project. Did my laundry. Then it was time to do the radio show. I got a little ranty because of all the things happening right now. Still had a good time doing the show though. The recording of this week's show is at https://kNOwBETTERHIPHOP.com

![Radio show episode image of a photo of an officer on horseback pulling at a Haitian asylum seeker by the shirt with the words Sept 25th 2021 Higher Standard](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b83f9lcrsse34kfbvm3s.jpg)

- Sunday : Was pretty productive day. Did the https://untilit.works cyphers. I turned the scheduling app I made for my friends into a Progressive Web App that they can install the application onto their devices just like a regular app. This way, they don't have to keep opening the browser and typing in the URL. I also got all the files needed to get a start on my new side project. I also got a chance to do a bunch of research for the stuff I'll be doing on the project. Then I watched an episode of Boruto and "The Walking Dead".

- Professional : Got some pretty good news to start of the week. The hackathon project that I worked on last week won the "Best Integration" award. Nice. The prize are some portable speakers. That's cool because I bought a projector for the van and the speakers could be a good complement to that. Speaking of the van, I'm thinking I'm going to take the next couple of weeks off so I can finally start working on the inside. Already cleared it with my manager. Other than that, had a couple of meetings and verified that some code I added to a demo actually works and the error I got was something beyond my control. Also got a chance to review a teammates new blog post.

- Personal : This new side project is pretty interesting. I'm learning some new things I've never done before, but building on things I've done in other projects. Just leveling up little by little every project.

![Dirt path in a forest that goes between 2 very large trees in Redwood State Park, CA, USA](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fwuoh89d1k4sxxuq8poq.jpg)

From my research, I think I may have found some browser APIs that will do what I need my side project to do. Going to see if I can get something up and runnin'. If I can get that working, the rest is pretty much stuff I've done before. Going to eat dinner, watch Boruto and get started coding.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube jQ-RrGCSa2M %}
Mutable and Immutable objects

Published: 2021-09-27 21:17:22

####If you’ve just started using Python, so you probably heard the theories that everything in python is objects …
####Maybe it sounds weird at the beginning, but the further you dive deep on python, the more you start assimilating and understanding the concept of object thing .

Nevertheless, let’s try today to explore together some basic notions and concepts related to our main topic, how objects are mutable and immutable in Python.

Objects in Python could be either **mutable** or **immutable** …
Like in science of genetics, the notion of mutation is basically how thing change with the time …Pythonic speaking,a single data object can represent something that evolves independently of the rest of the program. The behavior of a changing object may be influenced by its history, just like an entity in the world.
The concept of mutation in Python could be identified and highlighted by two parameters: id and type …

**ID** :The built-in function id() returns the identity of an object as an integer. This integer usually corresponds to the object’s location in memory, although this is specific to the Python implementation and the platform being used. The is operator compares the identity of two objects.
**Type**:The built-in function type() and in association with the print function, print the type of an object. Lets look at a simple example :
```
a = "Holberton_Tunisia"
>>> id(a) = 1258755887 #this is the addressee memory where the              
                       #object is stored
type(a)
>>> <class: 'string'>
```
####why does it matter and how differently does Python treat mutable and immutable objects ?

As we’ve said earlier, a mutation is the ability to change state through the time… So a mutable object can change its state or contents but there is also object that can not mutate … they are immutable .
```
a = 14 #a variable of type int
b = 14 #a variable of type int
#if we perform some logical operators:
a == b (TRUE)
a is b (TRUE)
#both of the two variables point to the same object
#simple operation:
a = a + 1
a == b (FALSE)
a is b (FALSE)
#modification of immutable objects is not possible
```

Let’s do the same but with mutable object:

```
>>> Listx = list([1, 2, 3])
>>> listy = listx
>>> listx.append(2)
>>> print(listx)
>>> 1, 2, 3, 4
>>> print(listy)
>>> 1, 2, 3, 4
#the two objects hast been mutated 
listx == listy (TRUE)
listx is listy (TRUE)
```

So, generally in **Python**:
* Mutable and immutable objects are handled differently . Immutable objects are quicker to access and not possible to change …
Whereas mutable objects are easy to change.
Use of mutable objects is recommended when there is a need to change the size or content of the object like Tuple .
But some exceptions are included here!!!
in fact we know that tuple in python is immutable. But the tuple consists of a sequence with unchangeable bindings to objects.

`tupl = (6, [3, 4, 5])`	

The tuple consists of an int and a list. int are immutable so we can’t change its value. But the contents of the list can change. **The tuple itself isn’t mutable but contain items that are mutable.**
First post, First product as a first-time developer. 
Published: 2021-09-27 21:06:44



One month ago, I started building [Subma](https://subma.io)  in public and, I've documented it on Twitter. 

https://twitter.com/Ibsylla13/status/1429545536030265347?s=20

###Today, I'm shipping the MVP. 🚀🥳


I wanted to share with you 3 lessons I've learned during my journey as a new developer.

Before going further, what's Subma?  Subma is a social media management tool aims to help marketer build a more collaborative social media marketing workforce and, boost their team productivity with a wide range of apps integration. 

Here is a 2mins video demo of subma 
[Youtube - Product Demo - Subma BETA (MVP) demo ](https://www.youtube.com/watch?v=hhGAOA1Krec&t=29s) 

_______________    ___________________


##Never pick a solution or tech stack until you have the big picture.

**The problem**: The problem was that Each minute, I needed to check each scheduled social media post, and if the post scheduled date arrived, posted on the dedicated social media. 

I've discovered only lately that using [Vercel](https://vercel.com)   for apps that perform heavy background jobs is not the best choice. Since the Vercel platform is event-driven, therefore not maintaining a running server and at 90% from finishing my MVP, it's become challenging for me to break down my ugly code into smaller pieces to ensure they are running under the 30-second timeout limit. 

**How I solved that?** Thanks to Jeff. I've decided to learn Amazon lambda; So I've coupled AWS lambda with CloudWatch instead of the API gateway, which applies a timeout of 30 seconds to lambada. 
CloudWatch will trigger my lambada function every minute without any timeout applied. 


##Don't be afraid to try new things.

I only know mongo DB. Before starting working with Subma, I've decided to do a one-month run to an MVP. I've written down my weakness and my superpower. While I'm good on the front, I'm not that excellent in the back. I needed something to handle all this part, and I found @supabase_io , and all I can say is that Supabase is magic. 
The same logic applied to NextJs. First time using it, and I did not want to go back to react. 


##Trying to Build Everything from Scratch
I'm entirely new to these things. I tried at the beginning to build everything by myself. For example, I tried to build a script that performs an URL image download and convert it into a base64. I've done it, but I faced a real performance issue, and before I've noticed it, I wasted three days in my planning. 
How I solved it? I found a very lightweight Node Js library image-to-base64. Implementation took me 10 min or less (Saying that I was telling my friend that I knew how to code)

That's it for my first post. Hope to get all your support 🙏🙏. 
Try [Subma](https://subma.io) for free and tell me what you think. 

Cheers
Introduction to Azure Data Services | Data Ingestion | Store | Processing | Visualization service
Tags: database, azure, bigdata, sql
Published: 2021-09-27 21:04:32

Know about different services for handing data in azure and which can be used for which scenarios.
<a href="http://www.youtube.com/watch?feature=player_embedded&v=0h-S4MkWUls" target="_blank"><img src="http://img.youtube.com/vi/0h-S4MkWUls/0.jpg" alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /></a>
King Of The Street: Drag racing game
Published: 2021-09-27 18:37:11

We recently launched our new drag racing game "King Of The Street" on Android and Apple.
Google play: http://bit.ly/2XE79xx
App Store: https://apple.co/3ufEPO1
I would like to ask you for an opinion about the game because we are constantly trying to improve it and bring new features.
What can be found in the game:
 · Career with over 60 races and 5 teams
 · 30+ unique cars
· 4 separate tracks with different surfaces
· Over 200 tuning parts (Engine / Gearbox / Tires / NOS / Chassis / Suspension / Auxiliary)
· Gasoline or diesel engines with the possibility of attaching a turbine or a supercharger
· Possibility to make a 4x4 car and change the differential and gearbox
· Consumption-based petrol simulation system that increases with the power of the car
· Cloud backup with support on both mobile platforms (email account once created keeps all data between the two platforms (Android and iOS)
· Multiple game interfaces (Button or slider for acceleration, the ability to turn off ESP)
· Many others that you can discover in the game.
Simple heart beating icon effect
Tags: css, ux, html, webdev
Published: 2021-09-27 20:56:22

![Heart beating icon on click](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3tp3e9e2wec93trtwdzr.gif)

Code: https://codepen.io/raafacachoeira/pen/rNwoeGm