teleren/devto huggingface dataset:
GetBlock Blockchain Nodes Provider On-Boards High-Performance Oracle Solutions
Tags: blockchain, crypto, web3, api
Published: 2022-05-27 12:00:51

Blockchain oracles should be referred to as the pivotal elements of global Web3 infrastructure. They are responsible for broadcasting asset prices and other sensitive information to various dApps.

**GetBlock nodes APIs are integrated into leading oracles platforms: Case of SupraOracles**

Blockchain oracles are actually smart contracts required for real-time data processing in decentralized systems. Namely, oracles can be integrated by decentralized finances protocols (DeFis) for seamless and accurate prices broadcasting.

This fact makes blockchain oracles a backbone element of modern cryptocurrencies ecosystem: for instance, the wrong settings utilized by Chainlink oracles resulted in collapse of some DeFis amidst LUNA and UST drama.

SupraOracles is one of the most technically advanced oracle solutions in the global Web3 segment. Its infrastructure supercharges industry heavyweights in the sphere of blockchain, DLTs, Big Data as well as Big 4 audit firms.

[GetBlock](https://getblock.io/) entered into a long-term strategic partnership with SupraOracles in Q4, 2021. GetBlock was chosen by SupraOracles as technical partner  to run a node and provide backup nodes in SupraOracles’ ecosystem.

Joshua D. Tobkin, CEO and Co-founder of SupraOracles, added that next phases of his team’s collaboration with GetBlock will include joint events and R&D initiatives:

We are selecting GetBlock to run a node due to its team’s reliability and market reputation. Our team is working closely with GetBlock’s team to understand and address the challenges that face node operations. In the future, we may plan for some AMMs and hackathons with their team. We see this as a long-term partnership with opportunities for further collaboration

**Reliable decentralized back-end for Web3 era**

Blockchain oracles are among the most challenging use-cases for GetBlock’s technical platform: running oracles require very low latency as even minor delay may create dangerous arbitrage opportunities.

GetBlock is ready to address this use-case with its dedicated nodes: our geographically distributed network of servers works across U.S., Europe, and Asia. Dedicated nodes can be rolled-out by request; GetBlock runs nodes on 16-thread CPUs and with 64 GB DDR4 RAM and high-end NVMe SSDs.

Both shared and dedicated nodes achieve 1 GBit/sec speed which is sufficient for running modern dApps of all sorts.
Web3 Hackathon
Published: 2022-05-27 11:08:36

https://supernova.devpost.com/

The Blockchain Singularity Internet Computer(IC):
Every system and service rebuilt + reimagined on fast and unlimited blockchain using smart contracts, with no need for traditional IT!
The full stack from front-end to back-end is completely decentralized!

Come on! The world need you!
Do you think Python is overrated ?
Tags: discuss, career, watercooler, webdev
Published: 2022-05-27 11:38:20

Conversation between a friend [Java programmer] and myself:
Me - I code in Python
Her - I h ate Python, it's overrated

Subscribe in Bek Brace YT Channel
https://www.youtube.com/bekbrace

Join Bek Brace Page @bekbraceinc
https://www.facebook.com/bekbraceinc

Instagram
https://www.instagram.com/bek_brace/

Reach out
info@bekbrace.com
Hardstuck Fresh Graduate
Published: 2022-05-27 11:16:19


I'm 1 month away from graduating with a BSc in software engineering. I've always seen myself as a freelance developer but that is kinda hard to start with and even if I wanted to work with a company, their demands will be 1yr experience at minimum.

Although I don't have that much of professional work experience, I`ve done a few projects that verifies my skills.

The question is how can I start my freelance career(or corporate career) giving that internship opportunities hardly exist in my country (Egypt) and nearly everyone want seniors with 5+ yrs. It`s really disappointing.
Hello World with Ada
Tags: ada
Published: 2022-05-10 23:31:42

Hi, i want to share with you basic about programming using Ada2012. 

**What is it Ada ?**

> Ada is a state-of-the art programming language that development teams worldwide are using for critical software: from microkernels and small-footprint, real-time embedded systems to large-scale enterprise applications, and everything in between

**Why use Ada? **

In short, because you want to write reliable and efficient code, with confidence that it works, and not waste time and effort in the process. Ada is unique among languages in how it helps you detect and eliminate bugs early in the software life cycle, when they are least expensive to correct. And as evidenced by the many successfully fielded applications that need to meet hard time or space constraints, Ada helps you build software that is reliable, safe and secure without sacrificing performance.


At the technical level, Ada has everything you might expect in a modern language:

- Extensive compile-time and run-time checks

- Full Object Oriented Programming support

- Concurrent programming features, including support for multicore

- Generic templates 

- Encapsulation

- Hierarchical program composition / programming-in-the-large

for more information about the language visit: [](https://www.adacore.com/)

Here is a simple program Hello world

A program in Ada2012 has an extension .adb (stands for ada body)


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

Let break it down

with Ada.Text_IO is an instruction just like import, include or from in other programming languages. It tells to the compiler to import the package Ada Text Input Output but not use it. And this package contains procedures to display text.

procedure in Ada is a function that return nothing. a procedure declaration always starts with the keyword procedure followed by the name of your choice in my case 'main' after we have is and then close using end plus the name of your choice (main). An instruction in ada always end up with semi colons.

Between procedure and end we have another keyword 'begin'. 

Between procedure we have the declarative region. This is the part where you can declare your local variables. Instructions 'use Ada.Text_IO;' set visible package Text_IO.

Between begin and end we can write instructions that need to be executed by the program. In our case we only want to print in the console 'Hello World !'.


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

To execute our program localy we need to install GNAT compiler provided by AdaCore. This software is available [here](https://www.adacore.com/download) for windows, Linux and Mac users.

That's it and i hope you enjoyed this short tutorial. Leave your comment down here i will be glad to answer you
19 Things to Know About Kotlin Flow — A Quick Note
Tags: kotlin, android, flow, things
Published: 2022-05-27 10:58:27


**Do you have one minute? great!**

It’s enough to have quick look at some useful things you should know about [Kotlin Flow](https://blog.canopas.com/7-useful-ways-to-create-flow-in-kotlin-577992b73315).

Here are 19 things you should know about [Kotlin Flow](https://blog.canopas.com/android-9-useful-kotlin-flow-operators-you-need-to-know-b9daef4b630f).

Flow is an asynchronous data stream that sequentially emits values and completes normally or with an exception.

1) Flows is basically cold stream, but flow can be converted into a hot stream by stateIn or shareIn operators.

2) StateFlow and SharedFlow are the hot stream variants.

3) Under the hood StateFlow is a shared flow. State flow never completes. State flow requires an initial value.

To read all the useful information about flow, visit our blog on [blog.canopas.com](https://blog.canopas.com/19-things-to-know-about-kotlin-flow-a-quick-note-1b90eb74f3b0).
Send an email without redirecting or reloading the page
Tags: javascript, php, beginners, tutorial
Published: 2022-05-27 10:58:17


HTML
```html
<div class="bg-text">Send Form</div>
<form id="myForm" method="POST" autocomplete="off" onsubmit="event.preventDefault(); sendForm()">
	<label for="name">Name: </label>
	<input type="text" name="name" id="name" />

	<label for="email">Email: </label>
	<input type="email" name="email" id="email" />

	<label for="subject">Subject: </label>
	<input type="text" name="subject" id="subject" />

	<label for="message-input">Message: </label>
	<textarea name="message-input" id="message-input" rows="7"></textarea>

	<button type="submit" value="Send" id="submit" class="">Send</button>
</form>
```
SCSS

```scss
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: sans-serif;
	font-size: 20px;
}
body {
	background-color: rgb(5, 43, 38);
	color: #ddd;
	display: flex;
	justify-content: center;
	align-items: center;
	height: 100vh;
}
.bg-text {
	position: absolute;
	font-size: 15rem;
	opacity: 0.1;
	text-align: center;
	user-select: none;
	pointer-events: none;
}
form {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	flex-direction: column;
	padding: 60px 50px;
	background-color: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(5px);
	border-radius: 5px;
	gap: 5px;
	label {
		margin-top: 15px;
	}
	input,
	textarea {
		width: 350px;
		border-radius: 5px;
		background-color: rgba(14, 42, 36, 0.839);
		border: none;
		color: #ddd;
		padding-left: 5px;
		outline: none;
        &:focus{
            border-bottom: 3px solid rgb(8, 92, 90);
        }
	}
	input {
		height: 40px;
	}
	textarea {
		padding-block: 5px;
		resize: none;
		height: 200px;
		overflow-y: auto;
		&::-webkit-scrollbar {
			width: 5px;
		}
		&::-webkit-scrollbar-thumb {
			background-color: rgb(8, 92, 90);
		}
	}
	#submit {
		padding: 15px 30px;
		margin-top: 20px;
		color: #ddd;
		background-color: rgb(8, 92, 90);
		border: none;
		cursor: pointer;
	}
}

```
JavaScript

```javascript
const sendForm = () => {
	const data = new FormData(document.getElementById('myForm'))
	const xhr = new XMLHttpRequest()
	xhr.open('POST', 'sendmail.php')
	xhr.onload = function () {
		console.log(this.response)
	}
	xhr.send(data)
}

```

PHP

```php
<?php 
    $name = $_POST['name'];
    $email = $_POST['email'];
    $subject = $_POST['subject'];
    $message = $_POST['message-input'];

    $mailheader = "From: ".$name." <".$email.">\r\n";

    $to = 'your-email@email.com';

    mail($to, $subject, $message, $mailheader);
?>
```
[CSS trick] Create a Linear Gradient Text
Tags: css
Published: 2022-05-27 10:20:46

1. Set a linear gradient background for the text.
2. Set _-webkit-background-clip_ to **text**.
3. Set the original text color to **transparent**.


**Example:**
```css
.some-text {
  background-image: linear-gradient(to right, red, orange, yellow, green, blue, purple);
  -webkit-background-clip: text;
  color: transparent;
} 
```

**Result:**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7v2zv1q4tebchp617xdn.png)
CoPY to CLIPBOARD in JavaScript !
Tags: javascript
Published: 2022-05-27 10:17:20

## Copy using javascript in proper way !

```
function copyme(e) {
	e = e || window.event;
	let target = e.target || e.srcElement;
 // const text = target.previousElementSibling.innerHTML;
        let text = e.target.value; // getting directly from input element 
	const el = 
 document.createElement('textarea');
	el.value = text;
	document.body.appendChild(el);
	el.select();
	document.execCommand('copy');
	document.body.removeChild(el);
}

```
Vim Convert Tab Key Press into Spaces
Tags: vim, snippet, webdev
Published: 2022-05-27 10:05:03

Here's a quick tip on how to convert the tab key in vim to spaces instead of the tab character. Put the following in your `~/.vimrc`:

```
set expandtab
set tabstop=2
set softtabstop=2
set shiftwidth=2
```

Or the following command when the editor is open:

```
:set et sw=2 ts=2 sts=2
```

Head over to [this article](https://codingshower.com/vim-set-tab-to-n-spaces/) to read up more on each setting/option specified above.
Open-source Java Wrapper for WhatsApp Cloud API
Tags: maven, java, cloud, whatsapp
Published: 2022-05-27 10:04:57

## WhatsApp launches a cloud API accessible to all

With WhatsApp Cloud API, Meta provides a free and secure cloud service to facilitate the work of developers.

 Until now, the WhatsApp Business API was reserved for > medium and large companies who wanted to facilitate exchanges with their customers, all over the world. Now, Meta offers a new version of WhatsApp Business, cloud-based and hosted by the parent company, accessible to all businesses, from SMEs to large groups.
 
 Concretely, WhatsApp Cloud API offers free and secure cloud hosting services. This makes it easily and quickly accessible to developers, who therefore do not have to worry about the details of data storage. With this API, the objective is to be able to customize WhatsApp services, through the configuration of different services that adapt to the needs of the company.

So I just developed a java library Opensource that implements some features offered by this api in other to facilitate their effective integration.


The library is on my [github repository](https://github.com/pathus90/watchap)

The basic functionalities have been implemented and this library will evolve. It will be deployed on the maven central repository soon.

Thanks..
configure Plesk and Gitlab to deploy your laravel application
Published: 2022-05-27 09:59:00

Assuming you have your project repository in Gitlab, and a Plesk hosting interface to work with, follow these steps to create a CI/CD between your gitlab repository and your hosting panel, and publishing automagically your laravel application.
Before you begin, some details: 
- If not available, ask your hosting provider to install the GIT Plesk extension. It's free and it's mandatory, to make this CI/CD work.
- Plesk has a default webroot public folder for your website, called '**httpdocs**'. We will instead use the default laravel '**public**' folder. So, enter your plesk admin panel, and click the Hosting Settings link. Change the value in the interface, as you see in this screenshot:

![Plesk admin interface](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e9e4z73cebw9eq5htp5x.png)

1. Open your project subscription in Plesk;
2. Click the GIT icon (if not installed, proceed to install the GIT extension, or ask your hosting provider to do so)
3. Click to Add Repository
4. Enter the **gitlab ssh** or the **https address** in the repository URL

![Plesk - Git extension interface](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gr2ce2427yagst306bpa.png)

Plesk will generate a **ssh public key**, maybe it will be already automatically copied in your clipboard. Copy it.

5. Go to your gitlab project, then go to **settings -> repository**, then click the **Expand button** of the '**Deploy Keys**' section.
6. Insert a name for your key, then paste the copied key in the field below. Check the '**Grant write permission to this key**' option, then click the '**add key**' button below.


![Gitlab settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u2xm6fu5k96yx7fht3b0.png)

7. Return to your plesk interface, then click again the Git icon.
You will find a panel like this one below:

![Plesk - git settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2p620re2u937reepug4b.png)

here you can change which branch will be published on your web server. Choose the one you need.
Next, we will change the default deployment location. Click the settings icon in the lower right corner of the panel, then change the **Server Path** leaving a simple slash /, removing the default folder, 'httpdocs'.


![Plesk - Git settings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i2hanvi5adbvbpdu0l8d.png)

8. click the **Deploy now** button to pull the git files onto the web server root.

Finally, you will need to make your laravel application work within your plesk hosting, running composer and npm. [Refer to this article](https://dev.to/massimocolella/step-by-step-guide-to-publish-you-laravel-project-on-a-shared-hosting-with-parallel-plesk-4p43).
Evrone’s report at PyconDE 2022: Why Python is More Complex Than You Think
Tags: python, programming, webdev, writing
Published: 2022-05-27 09:37:46

Our DevRel, Grigory Petrov, prepared an interesting report, “Easy Python: Lies, Damned Lies, and Metaclasses”, about the Python language, its evolution, and its use. In April 2022, Grigory was supposed to go to a conference in Berlin to give a presentation on the report.

But the trip was not without obstacles. Flights were canceled, he could not get to Germany on time, and nothing went according to plan. How did we overcome the challenges so Grigory could give his speech at the largest Python conference in Germany? [Read in the article!](https://evrone.com/PyconDE_2022)
Trick FB with some JS to allow advertisement for titles not allowed
Published: 2022-05-27 09:32:15

If you want to give away your PS account, you need a list of all games purchased and as a developer you will not do it by hand.

So for my four pages of games I own for the PS I write a little script that works with:

`https://library.playstation.com/recently-purchased`

```js
document.querySelectorAll('[data-qa="collection-game-list-product#title"')
  .forEach((node) =>
    console.log(node.textContent))
```

So with all those console logs, I have all I need for a Facebook posting.

The problem is, my posting gets banned, I think because of some game titles in there.

My idea to get beyond this, was to add little spaces to each letter, so that a simple algorithm can not find the forbidden names. 

First I create a long string from my console logs.

```js
allTitles = `The Art of Horizon Zero Dawn™
Horizon Zero Dawn™: Complete Edition
HITMAN 3
HITMAN 3
ABZU
Enter the Gungeon
Paper Beast
Rez Infinite
The Witness
Thumper
...
```

Next I transform each string line into a new string in with each letter is separated by a hair space.
 
```js
spacedTitles = allTitles.split('\n').map((title) => {
  return [...title].map(char => char + '\u200A').join('')
})
```

And this spaced title map is then transformed back into a long string on the console.

```js
console.log(
  spacedTitles.reduce((all, title) =>
    `${all}${title}\n`, ''
  )
)
```

Becoming this

T h e   A r t   o f   H o r i z o n   Z e r o   D a w n ™ 
H o r i z o n   Z e r o   D a w n ™ :   C o m p l e t e   E d i t i o n 
H I T M A N   3 
H I T M A N   3 
A B Z U 
E n t e r   t h e   G u n g e o n 
P a p e r   B e a s t 
R e z   I n f i n i t e 
T h e   W i t n e s s 

And this is finally not recordnized by FB as forbidden - mission complete.
This week in Python
Tags: python, discuss, django
Published: 2022-05-27 09:02:34


**Fri, May 27, 2022**


This Week in Python is a concise reading list about what happened in the past week in the Python universe. 


{% embed https://twitter.com/bascodes/status/1530108801663246337 %}


## Python Articles
- [Python Standard Library changes in recent years](https://antonz.org/python-stdlib-changes/) – How the Python std lib changed with the last Python versions
- [Contributing to open source](https://mathspp.com/blog/contributing-to-open-source-rich-2073) – Rodrigo started contributing to open source
- [25 Python Projects for Beginners](https://www.freecodecamp.org/news/python-projects-for-beginners/)
- [Multitenancy with FastAPI](https://mergeboard.com/blog/6-multitenancy-fastapi-sqlalchemy-postgresql/)
- [Memory Management in Python](https://anvil.works/articles/pointers-in-my-python-1) – First part of a series about memory management in CPython







## Projects

<!-- huey – a little task queue for python
https://github.com/coleifer/huey -->

- [rounder](https://github.com/nyggus/rounder) – Python package for rounding floats and complex numbers in complex Python objects
- [Pants](https://github.com/everythingishacked/Pants) – A video filter to add pants or blur out your lower half on Zoom calls when you forget to wear pants
- [tetra](https://github.com/samwillis/tetra) – A full stack component framework for Django using Alpine.js – by @samwillis
- [cog](https://github.com/arun1729/cog) – Micro Graph Database for Python Applications – 
- [dotdrop](https://github.com/deadc0de6/dotdrop) – Save your dotfiles once, deploy them everywhere
React Holmes 🔍 - Elementary State Orchestrator for React
Tags: react, javascript, opensource, showdev
Published: 2022-05-27 09:26:50

React Holmes is a 0 config, fast and elementary state orchestrator for React.

Holmes has a very minimal API. It is as simple to use as React’s integrated hooks, but all state is globally accessible.

💡 Easy as React state hooks

🔄 State synchronization between components

🛰️ Distributed and not centralized state

🤯 No mutable objects

🚀 Fast

[React Holmes on Github](https://github.com/devx-os/react-holmes)

## Motivation

React components has a built-in state object, where you store property values that belongs to the component.

When the state object changes, the component re-renders.

This behaviour has certain limitations:

Component state can only be shared by pushing it up to the common ancestor, but this might include a huge tree that then needs to re-render.
React-Holmes adopts a new vision when talking about state handling.

As other state managers use an external single source of truth to hydrate app client on state change, React-Holmes does not create an external store and does not need to wrap your app in a context.

So, where is the global state?
There is no global state, actually.
The state is decentralized into components themselves.

The ONLY differences are the hook declared for state management and a key to identify state chunk.

While to declare a React state we need to declare it as:

    const [state, setState] = React.useState('test');

with React-Holmes we need to declare it as:

    const [state, setState] = useHolmesState('key', 'test');

What does useHolmesState do?
When a state is set with useHolmesState, the hook is responsible to set state with React and add some power ups to it.

In fact, when a component using useHolmesState is mounted, it will create (if not exists) a new RxJs Observable identified by specified key.

If we register another component with the same key, it will not create another Observable, instead it will subscribe to existing one, allowing access to its value and its callback to mutate the state.

This allows state handling to be delegated to React itself, guaranteeing reactish updates and shared state too.

So React-Holmes can be considered a React state orchestrator because its hooks can be used into very small and deeply nested components without performance impacts generated by multiple re-renders.

[React Holmes on Github](https://github.com/devx-os/react-holmes)