teleren/devto huggingface dataset:
Api 101 Session with the Postman community
Tags: programming, api, webdev
Published: 2021-10-12 13:39:52

Had a great time in the Api 101 session conducted by Postman Community with our Postman Student experts Sourav Bera and Swastik Mishra.Got a chance to learn a lot about the postman community,public workspace,how to make a collection using GET,POST,PUT and DELETE.
In this session we first learnt about What are Api's(Application Programming Interface).This session mainly focused on the basics of Api why should one use it,how it works,and how we can properly use it using Postman.I previously didn't knew Api is used in almost everything.Postman has literally changed how the world used to see Api using the curl command line. Postman has simplified it with its UI.
First the session started with making requests that is how we interact with the Api.From this we got three parts the methods,address/endpoints and the Path.After that I got to know about the Status codes such as 200 OK,404 Not Found.
We then had the hands on practice on Postman in which we navigated to the Postman Student Api 101 Workshop.
Then they help us to understand basic Auth,Robust Apis and variables.
After All this theory I finally got to do some interesting practical.I made my own Api using Api operations like GET,POST,PUT and DELETE.
Afterall it was a great session with the Postman Community.
 #PostmanStudent #PostmanAPI
Uber for X is an optimistic solution that can provide any service.

Tags: php, mobile
Published: 2021-10-12 13:07:52

You have a number of fresh company ideas that you'd want to turn become a reality, and you'd like an app to help you manage them. INORU can help you develop your Uber for X app and have it deployed quickly so you can focus on your business. The Uber for X has no fixed structure and is designed to adapt to new modifications, features, and amenities. Our white label solutions are user-friendly enough to have your app approved and licenced under your name. We support your app 24 hours a day, seven days a week and are always available to help. So, what are you waiting for? Get an Uber for X app built, whether it's for a beauty service, a taxi, event management, painting, laundry, or ticket buying.
Visit Us: https://www.inoru.com/uber-for-x
APIs 101 Using Postman 
Tags: beginners, productivity
Published: 2021-10-12 13:00:48

7 th of October 2021 I have attended "APIs 101 Using Postman" workshop organised by the Postman Student Experts @zeoshark and Swastik Mishra from ITER SOA virtually on YouTube live. It was a great experience overall and I learn about Postman APIs. Workshop covered basic request methods that are GET, POST ,PUT and DELETE along with data retrieval in JSON format. All these methods were explained in fun manner with examples in which ever member can create their IDs and posts their fun jokes individually.
Overall it was an overwhelming experience to attend this learning along with fun. Kudos to the Postman Student Experts @zeoshark and Swastik Mishra.
Thank you  for the opportunity @zeoshark and @Swastik Mishra .....
Waiting for swags eagerly 😍🤩
Automatically organize imports
Tags: vscode, typescript, javascript, tip
Published: 2021-10-12 13:00:40

---
title: Automatically organize imports
published: true
description: A small tip for automatically organizing your typescript imports
tags: vscode, typescript, javascript, tip
---

While refactoring your javascript/typescript code it's easy to remove things but forget to get rid of the unused imports.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gfb04yf67dur21b7gotn.png)

In VSCode, you can easily remove these with the shortcut : Shift + Alt + O. 
This is sometimes easy to forget to do though, and wouldn't it be better if there was some way to do this automatically every time you save? 

In VSCode, go to File -> Preferences -> Settings and click on the icon in the top right hand corner to open up the settings in JSON.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l9eab8h2071qde0goq7z.png)

Add the following json: 

```
"editor.codeActionsOnSave": {
    "source.organizeImports": true
},
```
So that it looks something like the following: 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ojdjwjz7fs2svtz6nnkp.png)

Et voilà! 
Your imports will now be organized every time you save a file. 
Enjoy :-)
The Importance of Representation
Tags: womenintech, adalovelace, codeiscolorful
Published: 2021-10-12 12:59:38


Today, on **Ada Lovelace Day**, we are celebrating women in STEM - and while we have come a  ~~far~~ well ... a way since Ada wrote the first ever computer program in 1843, there is still a lot to do.  

Lately, I have been reminded of the importance of representation quite a lot. We keep discussing why less women sign up to study computer science, why we have fewer applicants from non-male developers and why it’s apparently “so difficult to diversify staff” (imagine me rolling my eyes here). **Yet we fail to accommodate the few folks that were brave enough to join this industry.** 

I’m tired of explaining why we need equal pay, equal recognition, equal opportunities & challenges - and I can only imagine how those who have been part of this battle much, much longer are feeling. Or why are not willing to continue the fight. 

**I love the support among women and other underrepresented groups in the tech community.** It’s one of the reasons I got in and am still here. But it can’t be all we got - we need representation. We need people who look and think like us at the top. In the middle. In all the damn places. And **we need allies.** 

Take today as a reminder to value all the great women in tech - to celebrate Ada Lovelace and all that came after her and are yet to come. **Make sure they know.** 

![Ada Lovelace Gif](http://1.bp.blogspot.com/-dtZsgEkZLIs/VAGRofvh-mI/AAAAAAAALCI/owNqmsalzXE/s1600/Amazing-Women-of-History_AdaLovelaceGIF8.gif)
Artwork by the [Amazing Women of History](http://amazingwomenofhistory.blogspot.com/2014/08/ada-lovelace-free-artwork-links.html)

If you are not sure how, here is a [list of seven ways to celebrate Ada Lovelace Day](https://rapidapi.com/blog/seven-ways-to-celebrate-ada-lovelace-day/), **including a list of videos to binge, tips on where you can donate to support women in STEM and a little guidance on how to diversify / audit your Twitter feed.**

What great achievements by women in this industry are you celebrating today? Happy Ada Lovelace Day, let’s make it count!💜
Free React Admin Dashboard with Recharts Template
Tags: html, react, css, javascript
Published: 2021-10-12 12:33:23

## You can get the template from the link proivided in the description of the video.

### Technologies Used :-
+ REACT
+ SASS

### Libraries and Assets Used :- 
+ Node Sass
+ React Icons
+ Recharts
+ Google Fonts

## To learn how to create this template watch the complete video. You can get the template for free from the link provided in the description of the video.

{% youtube S3PpDpEeer8 %}

## Please do like the video and subscribe to the channel. It helps and motivates me to create more content like this.
Just one line code that will cleanup your jsx
Tags: react, typescript
Published: 2021-10-12 09:14:59

---
title: Just one line code that will cleanup your jsx
published: true
description: 
tags: #react #typescript
---

You might have seen the code like:

```tsx
function Profile() {
  const [res] = useQuery({ query: GetCurrentUser })

  return (
    <div>
      {res.fetching && <Spinner />}
      {res.error && <p>error</p>}
      {res.data?.currentUser && (
        <div>
          <Avatar name={res.data.currentUser.name} size="l" />
          <p>{res.data.currentUser.name}</p>
          <p>{res.data.currentUser.email}</p>
          <p>{res.data.currentUser.age}</p>
        </div>
      )}
    </div>
  )
}
```

Here, `res.data.currentUser` is used over time. How can we make it cleaner?

Extracting to another component (e.g. ProfileCard) is definitely a solution. But sometimes we want to keep it in one component.

Or you can reassign it to a variable:

```tsx
function Profile() {
  const [res] = useQuery({ query: GetCurrentUser })

  if (res.fetching) return <Spinner />

  if (res.error || !res.data) return <p>error</p>

  const { currentUser } = res.data

  return (
    <div>
      {currentUser && (
        <div>
          <Avatar name={currentUser.name} size="l" />
          <p>{currentUser.name}</p>
          <p>{currentUser.email}</p>
          <p>{currentUser.age}</p>
        </div>
      )}
    </div>
  )
}
```

Looks better, but you should change the other things like res.fetching and res.error (otherwise TypeScript gonna shout at you). And sometimes we want render h1 without waiting response from api.


## better approarch: fromObject

So what we wanted to achieve in the first place?

```tsx
{res.data?.currentUser && (
  <div>
    <Avatar name={res.data.currentUser.name} size="l" />
    <p>{res.data.currentUser.name}</p>
    <p>{res.data.currentUser.email}</p>
    <p>{res.data.currentUser.age}</p>
  </div>
)}
```

In order to reduce abundant `res.data.currentUser`, we'd like to have code that **if res.data.currentUser exists, assign or spread temporarily and use it to return jsx**.

And you can do this with just a one lines of code:

```js
export const fromObject = (obj) => (cb) => cb(obj)
```

in TypeScript:

```ts
export function fromObject<T extends Record<string, unknown>>(
  obj: T
): <R>(fn: (obj: T) => R) => R {
  return (fn) => fn(obj)
}
```

Then use it to clean up the code:

```tsx
{res.data?.currentUser &&
  fromObject(res.data.currentUser)(({ name, email, age }) => (
    <div>
      <Avatar name={name} size="l" />
      <p>{name}</p>
      <p>{email}</p>
      <p>{age}</p>
    </div>
))}
```

Tada! looks way nicer, uh?

Though it's a simple solution, I've never seen in my more than 5 years of career as a React developer.
If you've done with similar solution or if you have any concerns, please let me know!
Css Button | Css Custom Checkbox Style With 3D Toggle Effect 2021
Tags: css, tutorial, beginners, webdev
Published: 2021-10-12 12:24:44

{% youtube OpbbPLPqSDc %}

Css Button | Css Custom Checkbox Style With 3D Toggle Effect 2021

Today, we'll go through how to create css custom checkbox style with 3d toggle effect step by step.
If you're new here, make sure to Subscribe my youtube channel.

🅰️ | Get the font I used
→  M Plus Rounded 1c : https://fonts.google.com/specimen/M+PLUS+Rounded+1c?query=m+plu

❤️ | Interested in seeing more videos? SUBSCRIBE NOW
→  https://bit.ly/3m4UgF5

👤 | Like - Follow & Subscribe
→  Twitter : https://twitter.com/codewithsadee
→  Github : https://github.com/codewithsadee
→  YouTube : https://bit.ly/3m4UgF5

---

[![Buy Me A Coffee](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9kn6vwn4mulhsx6o69is.png)](https://www.buymeacoffee.com/codewithsadee)
Caching XHR Responses in Local Storage
Published: 2021-10-12 12:23:49

So, I've been working on my site recently - https://uktidetimes.com/ - and it occurred to me that since I'm serving content that only changes once a day, there's really no reason for the same user to repeatedly hit the service. 

I was already using Axios for my XHR requests, so I've put together an NPM module that wraps Axios but adds additional caching capabilities using local storage in the browser.

There's two primary benefits to this: 

* It reduces the amount of traffic to my API (which is running on AWS Lambda) - therefore reducing costs.
* It improves load time for the user if they've already views this data

https://www.npmjs.com/package/xhr-cache-with-ttl

As a coder, I obviously want to do as little typing as possible so I wanted to take the approach of wrapping a known-awesome HTTP request library (in this case Axios) because most of the work has been done already. Nobody wants to reinvent that wheel today, thank you.

```
function xhrCache(method, url, options = {}) {
    return new Promise(function (resolve, reject) {
        axios[method](url, options).then((res) => {
            resolve(res)
        })
    })
}
```

Nice and easy. Axios wrapped in a promise, passing through the method, URL and options attributes that it already uses.

This just left me to throw together a basic caching mechanism.

I decided that I'd create two keys in local storage per cached request - one for the metadata (TTL and timestamp) and one for the response. This avoids a potentially heavy deserialisation cost of expired cache items.

I'm using the URL of the request as part of the key in local storage. This helps with diagnosing any issues but there's an argument for hashing it for brevity (and differentiating more complex requests). Maybe for another day.

The flow of the function is nice and simple.

```
if (cache exists && cache not expired){
    return cached content
} else {
    fetch content using Axios
    cache content
    return content
}

```

The whole thing comes in at less than 100 lines of code, and it's open source so feel free to make off with it :)

https://github.com/davecozens/xhr-cache-with-ttl 

# How to use it
```
const result = await xhrCache("get", url, { ttl: 600 })
```
Terminal Animation completely using JavaScript
Tags: javascript, webdev, beginners, css
Published: 2021-10-12 12:23:15

If you are following me you already know that we have made Terminal Animation using <b>Typed.js</b> library. It was also a marvelous library.

But this time we are going to code completely using JavaScript. Main advantage of creating this with complete JavaScript you can also implement it in your WordPress, Wix or Gatsby Js Website while sometimes error occurs while using this animation with Typed.js

![JavaScript Developer](https://cdni.iconscout.com/illustration/premium/thumb/developer-doing-programming-opening-multi-working-tabs-on-the-desktop-2381447-1997255.png)

### So let's dive into code 🤘
{% codepen https://codepen.io/shahstavan07/pen/ExvayKd %}

If you want to increase or decrease typing speed than change in this code:
```javascript
const normalSpeed = Math.random() * (100 -50) + 100
// Simply increase or decrease last number [100] 
```
Want to change the Strings? Change this code:
```javascript
const phrases = ['Hello, my name is Shah Stavan.', 'I love to code.', 'I love to teach.']
// Add your Strings 
```
<hr>
<h5>Hope you have enjoyed this POST 😁✌️</h5>
Leadgenerierung im Onlinemarketing
Tags: onlinemarketing, lead
Published: 2021-10-21 18:43:38

---
title: Leadgenerierung im Onlinemarketing
published: true
date: 2021-10-12 12:15:33 UTC
tags: OnlineMarketing,lead
canonical_url: https://bloggerpilot.com/leadgenerierung/
---

![Lead Generierung im Online Marketing](https://bloggerpilot.com/wp-content/uploads/2021/10/leadgenerierung.png)

Im Mittelpunkt jedes erfolgreichen Unternehmens, und damit auch bei Leadgenerierung...

Der Original-Artikel erschien auf [Leadgenerierung im Onlinemarketing](https://bloggerpilot.com/leadgenerierung/).
Do you actually mind bots scraping data from your website?
Tags: webdev, security, discuss, monitoring
Published: 2021-10-12 12:15:09

Hello, Developers!

As I’m developing my products (the latest one being [BotMeNot](https://botmenot.com/)), I often wonder - do people actually mind data being scraped from their websites?

On the one hand, it’s publicly available information - meaning it’s up for grabs for any visitor. I’ve even read some people saying that if you don’t want information being collected from your website - don’t put it on the website in the first place. Do you agree or is this too harsh of a stance in your opinion?

On the other hand, it’s a very automated process of information gathering. Web scrapers are far more efficient than humans can ever hope to be. Does this make a difference to you?

Also, even if you’re not a website owner, please share your opinion!
Create a Simple Decimal to Binary Converter With Python
Tags: python, programming, 100daysofcode, beginners
Published: 2021-10-12 12:09:43

In this particular article, we look into how we can create a graphical user interface for converting a decimal number into binary with the help of the Tkinter Python library. Although we can convert a decimal number to binary in many ways in this particular case we will use the Python Numpy Library to convert a Decimal value to a binary value for error handling. 
The Complete article for the [Decimal to Binary Converter with Python] (https://www.alixaprodev.com/2021/10/-decimal-to-binary-with-python.html).
```
from tkinter import *
from tkinter import ttk
from numpy import binary_repr

def decimal_2_bin(*args):
    try:
        value = int(decimal.get())
        binary.set(binary_repr(value, None))
    except ValueError:
        pass
root = Tk()
root.title("Decimal2Bin")
mainframe = ttk.Frame(root, padding="3 3 12 12")
mainframe.grid(column=0, row=0, sticky=(N, W, E, S))
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
decimal = StringVar()
decimal_entry = ttk.Entry(mainframe, width=7, textvariable=decimal)
decimal_entry.grid(column=2, row=1, sticky=(W, E))
binary = StringVar()
ttk.Label(mainframe, textvariable=binary).grid(column=2, row=2, sticky=(W, E))
ttk.Button(mainframe, text="Calculate", command=decimal_2_bin).grid(column=3, row=3, sticky=W)
ttk.Label(mainframe, text="in Decimal").grid(column=3, row=1, sticky=W)
ttk.Label(mainframe, text="is equivalent to").grid(column=1, row=2, sticky=E)
ttk.Label(mainframe, text="Binary").grid(column=3, row=2, sticky=W)
for child in mainframe.winfo_children():
    child.grid_configure(padx=5, pady=5)

decimal_entry.focus()
root.bind("<Return>", decimal_2_bin)
root.mainloop()
```
If you have any questions please let me know in the comment section.
Dynamically direct routes for polymorphic associations - Ruby on Rails
Tags: ruby, rails
Published: 2021-10-12 12:01:28

Have you ever struggled with polymorphic associations? We all have, don’t worry.
Here’s an example of a polymorphic relationship.

{% gist https://gist.github.com/sabljak/19e7fcbe72f720e8a7bdf3cb20ae2098 %}

I’ve recently bumped into a problem where I had to list out all subjects (employees and products in this case) and when user interacted with one list item, it would redirect to that subject’s show page.

{% gist https://gist.github.com/sabljak/36724b2b7208db20c88dfb409e0c144c %}

You can see the problem, right? The obvious solution here would be to check the type of imageable and set the path helper accordingly. But, there’s a slightly more advanced technique for this use-case: direct method.
In your routes.rb file simply add this:

{% gist https://gist.github.com/sabljak/d83bf3b829c2de3fa0f50a7792c055ba %}

And now you can use imageable_path(imageable) as a path helper that will dynamically resolve to imageable’s show page.
Now our example above becomes:

{% gist https://gist.github.com/sabljak/f085041f286a668c757d9ed3f68e9013 %}

Aaaand voilà, we’ve got a path helper that resolves to any imageable show page without the need to manually check for the type of imageable.
Today's Fun Joke For Developers - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2021-10-12 12:00:11

---
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/5e1258ef9deee.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 proud React component say to its child?

___A:___ I've got to give you props
 -->
Product Landing Page
Published: 2021-10-12 11:45:48

Full View - https://bootstraptemplate.net/downloads/best-product-landing-page/

Get UI HUT Lifetime access and use "SOP10" for a 10% discount.

This is a stylish and modern Product Landing Page. This Page is for products with clean and modern designs. It will give interactive product presentations for your company. It’s very clean designed to bring a user experience that you will definitely love. It is a complete solution for Product related requirements, that answers every user’s need. With its vast entirety, it serves with useful sections and a nice visual presentation that gives a classic impression of your product.
Reinforcement Learning Workshop with Apiumhub, BBVA & Facebook
Tags: datascience
Published: 2021-12-08 10:47:43

---
title: Reinforcement Learning Workshop with Apiumhub, BBVA & Facebook
published: true
date: 2021-10-12 11:31:00 UTC
tags: DataScience
canonical_url: https://apiumhub.com/tech-blog-barcelona/reinforcement-learning-workshop-apiumhub-bbva-facebook/
---

We are incredibly proud to announce that we are organizing a Reinforcement Learning Workshop in Madrid with Data Scientists from Apiumhub, BBVA & Facebook. 

## About Reinforcement Learning Workshop

Save the date! The workshop will take place on December 2nd at 9:00 in C. de Piamonte, 23, 28004 Madrid (Spain). This workshop is designed for a total of 4 hours with an approximate break of 30 minutes.

Reinforcement Learning has positioned itself over time as one of the artificial intelligence techniques to solve business problems and as an important area of advanced research in the field of Artificial Intelligence. Reinforcement Learning, as David Silver (principal research scientist at Google DeepMind) says “could constitute a solution to artificial general intelligence“.

In this Reinforcement Learning Workshop you will learn critical points of the implementation in production, focusing on different real use cases. Always from a didactic, functional, and very understandable point of view to be able to be activated within different industrial sectors.

Designed with a strong functional focus without neglecting the important technical challenges and concepts, this course is focused for different profiles:

- CTOs, CIOs and CDOs
- Organizational leaders such as program managers, data strategies, enterprise architects who are responsible for implementing the execution of data and Artificial Intelligence departments.

The sessions include presentations from industry leaders in innovation and business: 

## Speakers

1. Alberto Hernandez – Head of AI at BBVA Innovation Labs
2. Gema Parreño – Data Scientist Lead at Apiumhub
3. Javier Abascal – Lead Data Engineer at Facebook
4. David Suárez – Data Scientist at Apiumhub

## Special Discount

Regular Tickets are available until November 15th at a price of 200€. Use **APIUMHUB** promo code and get 20% discount ( Valid till 5th of November )

You can choose between three different payment methods for this course:

Method 1: [Bank Transfer](https://apiumacademy.com/contact/#choose-course-contact)

Method 2: Payment using [Fundae](https://www.fundae.es/empresas/home/como-bonificarte)

Method 3: Direct Payment using [Xing](https://www.xing.com/events/reinforcement-learning-workshop-3634729) 

If you have any questions, [let us know](https://apiumhub.com/)!