Productivity is the result of a commitment to excellence, intelligent planning, and focused effort.

HypeJS.

A place about all things JavaScript and more

Cover Image for Using asyncio for concurrent http requests with Python (asyncio.ensure_future and asyncio.gather)

Using asyncio for concurrent http requests with Python (asyncio.ensure_future and asyncio.gather)

Posted on:
Announcement: If you are interested to contribute with articles, contact me at georgerdp@gmail.com

I hope you are finding this platform useful and wishing you to have a good day!

Python has a few ways for implementing fetching data using http with various packages. "requests", "asyncio", etc. In this article will make a practical example that demonstrates how to run 100 requests concurrently as asyncio tasks and then how to save the results to a file as json, using asyncio.ensure_future and asyncio.gather.

George Crisan
George Crisan

More Stories

Cover Image for Set Environment Variables in LINUX with PM2 for Node and more

Set Environment Variables in LINUX with PM2 for Node and more

Posted on:

Environment variables are an essential component of any Linux system, enabling the configuration and behavior of various applications and services. In this article, we will explore how to print, set, and use environment variables in Linux, along with a specific focus on PM2's "--update-env" flag for restarting services. Whether you're a beginner or an experienced Linux user, this guide will help you navigate the world of environment variables and enhance your system's functionality.

George Crisan
George Crisan
Cover Image for Python vs JavaScript snippets

Python vs JavaScript snippets

Posted on:

I've started recently to use Python with Scrapy. Naturally, when I need to do certain things like spreading a list of values or using a try/catch block, my brain attempts initially to write code the way we do it in JavaScript. (I've done mainly JavaScript for the last 7 years or so) Assuming you are new to Python too, these snippets are meant to stimulate our brain's neuroplasticity. Enjoy.

George Crisan
George Crisan
Cover Image for Use cases for Proxy in JavaScript

Use cases for Proxy in JavaScript

Posted on:

A proxy in JavaScript is an object that acts as an interface to another object, allowing you to intercept and customize operations performed on that object. This can be useful for a variety of purposes, such as logging, validation, access control and caching.

Admin Bot
Admin Bot
Cover Image for Unconventional ways of using JavaScript

Unconventional ways of using JavaScript

Posted on:

JavaScript is a versatile programming language that can be used in a wide range of applications. While it's commonly used for web development, there are many unconventional ways to use JavaScript that you may not be aware of. In this article, we'll explore some of the creative and unconventional ways to use JavaScript.

Admin Bot
Admin Bot
Cover Image for A brief summary of React vs Angular vs Vue

A brief summary of React vs Angular vs Vue

Posted on:

Brief summary between the 3 technologies that are available to solve similar problems.

Admin Bot
Admin Bot
Cover Image for WebSockets, the "why" and "how"

WebSockets, the "why" and "how"

Posted on:

The WebSocket protocol facilitates message passing between a client and server providing a bidirectional, full-duplex communications channel that operates over HTTP through a single TCP/IP socket connection meaning that it is a persistent connection between a client and server.

George Crisan
George Crisan
Cover Image for What is a packet?

What is a packet?

Posted on:

Any data sent over the Internet is divided into smaller segments called packets. In networking, a packet is a small segment of a larger payload. Data sent over computer networks is divided into packets. These packets are then recombined by the computer or device that receives them.

George Crisan
George Crisan
Cover Image for Functions As Values, JS functions tutorial

Functions As Values, JS functions tutorial

Posted on:

Function definition and invocation are syntactic features of JavaScript and of most other programming languages. In JavaScript, however, functions are not only syntax but also values, which means they can be assigned to variables, stored in the properties of objects or the elements of arrays, passed as arguments to functions, and so on.

Admin Bot
Admin Bot
Cover Image for File extensions, description and the MIME types for the Web

File extensions, description and the MIME types for the Web

Posted on:

File extensions, description and the MIME types for the Web, video mime types, zip mime types and more. Multipurpose Internet Mail Extensions or MIME type gives information about the nature and format of a document, file, or assortment of bytes.

Admin Bot
Admin Bot
Cover Image for Another SOLID article, the SOD.

Another SOLID article, the SOD.

Posted on:

These principles should be taken as a guide, should have a place in your thinking as a suggestion and not as a religious dogma. In this article I am going to discus 3 of the 5 principles, hence the SOD. Why the SOD? Because these are the principles I find most applicable in my day to day tasks.

Admin Bot
Admin Bot
Cover Image for Another JavaScript framework? Qwik

Another JavaScript framework? Qwik

Posted on:

Much like React, Qwik is a framework that renders a tree of components resulting in an interactive application.

Admin Bot
Admin Bot
Cover Image for Implicit and explicit coercion in JavaScript

Implicit and explicit coercion in JavaScript

Posted on:

JavaScript is a weakly-typed language, values can also be converted between different types automatically. This is what we call implicit type coercion. We also have the ability to convert values in a more implicit way using various techniques. This is an article about the implicit and explicit (type casting) type coercion in JavaScript.

George Crisan
George Crisan
Cover Image for Amend the state in React using the context Api and useContext hook

Amend the state in React using the context Api and useContext hook

Posted on:

This article is an example of how to amend the state in React using the context API and the "useContext" hook.

George Crisan
George Crisan
Cover Image for TypeScript Exception - Property does not exist on type window

TypeScript Exception - Property does not exist on type window

Posted on:

Have you ever had this error? Property does not exist on type 'Window & typeof globalThis'

Admin Bot
Admin Bot
Cover Image for Garbage Collection in JavaScript

Garbage Collection in JavaScript

Posted on:

The data created in JavaScript needs memory in order to persist while the program is running. Have you ever asked yourself what happens with the data that is not needed anymore?

Admin Bot
Admin Bot
Cover Image for JavaScript Adapter Pattern

JavaScript Adapter Pattern

Posted on:

The "Adapter Pattern" is a structural pattern where the interface of one class is translated into another. This pattern allows classes work together that could not otherwise, because of incompatible interfaces.

George Crisan
George Crisan
Cover Image for Arrow function limitations in JavaScript

Arrow function limitations in JavaScript

Posted on:

This is an article about the limitations of arrow style functions written in JavaScript

George Crisan
George Crisan
Cover Image for Equality, Sort, Range - MongoDB index creation

Equality, Sort, Range - MongoDB index creation

Posted on:

This article is an example of why for most of the queries that include some sort of equality, range, and sorting, the way you are building your indexes can have a big performance impact.

George Crisan
George Crisan