teleren/devto huggingface dataset:
Companies using AWS
Tags: aws, canv
Published: 2023-02-19 18:22:40


![AWS](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/25ze39te61odltg5ihfc.png)


What is AWS?
Amazon Web Services (AWS) is a cloud service provider that uses Amazon’s own infrastructure and experience. Rather than a division of the company, like Microsoft’s Azure, AWS is a subsidiary company of Amazon.

AWS offers a wide range of cloud services, from basic hosting and deployment to analytics, blockchain, machine learning, and more.


Organizations of all sizes across all industries are transforming their businesses and delivering on their missions every day using AWS. 

BigBasket Grows Bigger with 400,000 Daily Orders on AWS : 
BigBasket, India’s largest online grocery, has been in business since 2011. Customer retention is at the heart of its strategy, as well as a hyper-local approach to inventory. BigBasket is available in 21 cities and runs its infrastructure on the Amazon Web Services (AWS) Cloud. The business had been growing 20–30 percent each year, but when COVID-19 struck and India went into lockdown, BigBasket faced unprecedented demand. Daily traffic was suddenly six times higher than pre–COVID-19 peaks.

1. Scales from 250,000 to 400,000 daily orders in 8 months
2. Maintains 99.9% site uptime with latency of 350 milliseconds
3. Saves 1 weeks’ worth of staff time per month on database maintenance
4. Frees up engineering time with managed services
5. Recommends products to expedite shopping experience
6. Develops loyalty program to reward repeat shoppers
7. Achieves high degree of geo-segmentation with data tools
Apache AGE Query Format
Tags: apacheage, graphdatabase
Published: 2023-02-19 18:20:17

In Apache AGE, hybrid query approach is used. The Query format is mixture of SQL and Cypher. It makes AGE Query Language a more powerful Query Language.

`Cypher()` executes the cypher query passed as an argument.

`cypher(graph_name, query_string, parameters)`

`General Form of Query in AGE:`

`SELECT * FROM cypher('graph_name', $$ 
/* Cypher Query Here */ 
$$) AS (result1 agtype, result2 agtype);`

**SELECT Clause**
Calling Cypher in the SELECT clause as an independent column is not allowed. However, Cypher may be used when it belongs as a conditional.

**Not Allowed**
`SELECT 
    cypher('graph_name',  $$ 
/* Cypher Query Here */ 
$$) AS (result1 agtype, result2 agtype);`


For more details visit: https://age.apache.org/overview/

**AGE Github Link:** https://github.com/apache/age

**AGE Viewer Github Link:** https://github.com/apache/age-viewer
Create your own memes in Terminal
Tags: imagemagick, meme, terminal, bash
Published: 2023-02-19 18:17:56

To create a _“meme”_, or just adding text to an image - you don't need an app or an online service. You can do it yourself, in Terminal, using ImageMagick. Here's a short snippet you can use.

_Since the command is kind of long, you can save in some file, or make a bash function - or maybe a script._

```bash
# ImageMagick v6
$ convert in.jpg -gravity south -font Impact -pointsize 120 -fill white -stroke black -strokewidth 3 -annotate +0+0 'Add text here' out.jpg

# ImageMagick v7
$ magick in.jpg -gravity south -font Impact -pointsize 120 -fill white -stroke black -strokewidth 3 -annotate +0+0 'Add text here' out.jpg
```

&nbsp;

#### Text position

For `-gravity` you can use your normal: north, south, center, southeast, etc.

&nbsp;

#### Fonts

I used `Impact` in the example. It's usally installed. But, if you want to change the font - just use another one from the list of fonts. Most font names are formatted with a dash, like “DevaVu-Sans-Bold”, “NimbusSans-Bold”, etc.

If you try one and it returns an error - you can get the list of fonts (ie. the font names) using:

```bash
# ImageMagick v6
$ identify -list font

# ImageMagick v7
$ magick -list font
```

To get a more readable list, you can use:

```bash
$ identify -list font | grep 'Font'
```

&nbsp;

#### Text stroke

The size of the text stroke depends a little on the font, and what you like. 1-3 are good values. I usually go with 2, and sometimes (depending on the font) I use 1 or 3.

3 is probably closest to what you get at an online meme generator.

&nbsp;

#### Example

Here's an example adding text 2 times (top and bottom).

```bash
$ magick in.jpg \
  -gravity north -font Impact \
  -pointsize 120 -fill white  \
  -stroke black -strokewidth 3 \
  -annotate +0+0 'Text at top' \
  out1.jpg
$ magick out1.jpg \
  -gravity south -font Impact \
  -pointsize 120 -fill white \
  -stroke black -strokewidth 3 \
  -annotate +0+0 'Text at bottom' \
  out2.jpg
```

![out2.jpg](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/reagjcc1lh63njgd2hoc.jpg)

- - -

It's more fun to spend time in Terminal, than at some online meme generator page. Plus, if you dig deeper into ImageMagick - you can add a lot of other effects as well. This was just a simple example.

&nbsp;

_// Happy hacking…_ :+1:

· Eric
Create & Delete Graph in AGE
Tags: apacheage, graphdatabase
Published: 2023-02-19 17:51:46

To create Graphs in AGE firstly we need to have a database in PostgreSQL.
Firstly, run the PostgreSQL server.

**Start Server**
`pg_ctl -D usr/local/pgsql/data -l logfile start`

**Databases List**
`psql -l`

**Select Database**
`psql databaseName`

If you have no database created. You can create one by:
`CREATE DATABASE databasename`

For First time create extension on database.
`CREATE EXTENSION age;`

**Load AGE**
`LOAD 'age';`

**Set the search path**
`SET search_path = ag_catalog, "$user", public;`


**Create a Graph**
`create_graph(graph_name);`

**Delete a Graph**
`drop_graph(graph_name, cascade);`


For more details visit: https://age.apache.org/overview/

**AGE Github Link:** https://github.com/apache/age

**AGE Viewer Github Link:** https://github.com/apache/age-viewer
The Buyit ecom template ...
Tags: typescript, nextjs, stripe, webdev
Published: 2023-02-19 17:36:50


## What I built
This is an awsome looking , eye catching ecommerce web app with most modern tech stack. 

### App Link
https://buyittheclassicmobiles.vercel.app/

### Screenshots

The Product page-->
![The Product page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hkb9ks953c9vfwbv6z3q.png)

The cart-->
![The cart](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/me6rknbrnjz1wvhlzdrq.png)

The Thank you page-->
![Thank you page](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xtnjpxeu3i3988viyiio.png)

### Description
This app is made by most modern tech  **NextJs , Sanity DB , Stripe paymants , Typescript**. It is just a template for an awsome ecommerce app template. It's database system is managed by Sanity.
 
**Sanity** is a cloud-based content management system that is commonly referred to as the Sanity database. It is a flexible and versatile platform that can be used for a wide range of content types and use cases. The Sanity database is built on a schemaless architecture and offers a powerful query language, real-time collaboration tools, a flexible editing interface, and support for a variety of data formats. It is a popular choice for developers and content creators who need an easy-to-use content management system that can scale to meet the demands of complex projects.
https://www.sanity.io/docs/http-api

It also used **stripe paymant** method. Stripe is a popular payment processing platform for developers and businesses. It provides a simple, secure way to accept online payments and offers powerful features such as developer-friendly APIs, customizable payment forms, and fraud detection tools. It is a reliable solution that can scale to meet the needs of growing businesses. Many large companies use it like Shopify, Digital Ocean, amazon stc .
https://stripe.com/en-in

### Permissive License
It is just a test project. Not actually production level app. 
Payment will be false. No money will be transfered actuallty.


## Background
well I was tired of using MongoDB. So thought of something different with incredible UI.


### What new I Learnt
I learnt sanity which is an awsome tool for data management.
More over whole thing was amazing.
Apache AGE Installation
Tags: apacheage, graphdatabase
Published: 2023-02-19 17:35:53

**1. Pre-Installation:**
Install the following essential libraries according to each OS. Building AGE from the source depends on the following Linux libraries (Ubuntu package names shown below):

**CentOS**
`yum install gcc glibc glib-common readline readline-devel zlib zlib-devel flex bison`
**Fedora**
`dnf install gcc glibc bison flex readline readline-devel zlib zlib-devel`
**Ubuntu**
`sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison`

**2. Installation**
Apache AGE is intended to be simple to install and run. It can be installed with Docker and other traditional ways.

**i. Install PosgtreSQL**
You will need to install an AGE compatible version of Postgres, for now AGE supports Postgres 11 and 12. Supporting the latest versions is on AGE roadmap.

**ii. Install From Package Manager**
You can use a package management that your OS provides to download AGE.
`sudo apt install postgresql `

**iii. Install AGE on Linux and MacOS**
Clone the github repository ([Link](https://github.com/apache/age)) or download the official release. Run the `pg_config` utility and check the version of PostgreSQL. Currently, **only PostgreSQL versions 11 & 12 are supported**. If you have any other version of Postgres, you will need to install PostgreSQL version 11 & 12.

**iv. Run**
`pg_config`

Run the following command in the source code directory of Apache AGE to build and install the extension.

`make install`
If the path to your Postgres installation is not in the PATH variable, add the path in the arguments:

`make PG_CONFIG=/path/to/postgres/bin/pg_config install`

**3. Post Installation**
For every connection of AGE you start, you will need to load the AGE extension.

`CREATE EXTENSION age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;
`
**Congratulations!** you have successfully installed Apache AGE.

For more details visit: https://age.apache.org/overview/

**AGE Github Link:** https://github.com/apache/age

**AGE Viewer Github Link:** https://github.com/apache/age-viewer
Minimalist web server for static files with Crystal
Tags: crystal, crystallang, howto
Published: 2023-02-19 17:30:00

---
title: Minimalist web server for static files with Crystal
published: true
description: 
tags: 
  - crystal
  - crystallang
  - howto
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/32ljw717osu23pim3fwb.jpg
# Use a ratio of 100:42 for best results.
published_at: 2023-02-19 17:30 +0000
---

## Problem

Build a cross-platform web server to serve static files in the local folder. 
Test local HTML, CSS, and JS files without CORS errors[^1].

> Many browsers, including Firefox and Chrome, now treat all local files as having opaque origins (by default). As a result, loading a local file with included local resources will result in CORS errors. 

## Solutions

The standard [Crystal] library allows an HTTP server to process requests[^2].

### Standard

Run a server on `http://127.0.0.1:8080` to serve files from the local directory.

```crystal
# server.cr
require "http/server"

def run(host="127.0.0.1", port=8080, local=".")
	server = HTTP::Server.new([
	  HTTP::ErrorHandler.new,
	  HTTP::LogHandler.new,
	  HTTP::CompressHandler.new,
	  HTTP::StaticFileHandler.new(local),
	])

	address = server.bind_tcp host, port
	puts "Listening on http://#{address}"
	server.listen
end

run
```

```shell
$ crystal run server.cr
Listening on http://127.0.0.1:8080
```

### Minimalist

Of course, you want to run it everywhere without creating additional files:

```shell
$ crystal eval -p 'require "http/server"; HTTP::Server.new([HTTP::StaticFileHandler.new(".")]).listen(8080)'
```

## References

[^1]: [Reason: CORS request not HTTP: Loading a local file](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSRequestNotHttp#loading_a_local_file)
[^2]: [Crystal: class HTTP::Server](https://crystal-lang.org/api/1.7.2/HTTP/Server.html)

[Crystal]: https://crystal-lang.org/
Easy way to Upload file use in Laravel File Storage.
Tags: laravel, linux, api, vue
Published: 2023-02-19 17:10:08

When I started learning Laravel ,first time faced problem to Uploaded file. I used to Laravel package that was very complicated for me . Then I show in Laravel [File Storage](https://laravel.com/docs/10.x/filesystem#introduction) thats very easy to use . Today I will discuss it. I will try how to  store file in my Laravel project simple. 
This is exactly how I upload files my project.

## Following this step by step : 

## First go to `.env` file and changed below.


```
APP_URL=http://127.0.0.1:8000   

FILESYSTEM_DISK=local to FILESYSTEM_DISK=public

```
## Create a folder inside the `storage/app` folder.

Example: 

```
 storage/app/profile

```

##  Run this command. 
 

```
php artisan storage:link
```

## Add the following to the controller to store file 

 

```
use Illuminate\Support\Facades\Storage;
use App\Models\HomePage;

 $data = $request->all();
 if ($request->file('image')) {
      $data['image'] = Storage::putFile('profile', 
            $request->file('image'));
    }
HomePage::create($data);

```
In this code `profile` is folder name where file are upload .



😀😀 Hurry Happy Coding 😀😀
Python 101: Introduction to Python for Data Science
Tags: python, pythonfordatascience, pythonintroduction, python101
Published: 2023-02-19 16:51:59

![Alt text] (https://th.bing.com/th/id/OIP.kuyfz6FTQ3mdnSdmr6PSvwHaFj?w=220&h=180&c=7&r=0&o=5&pid=1.7)

Let's get started with data science in Python by first understanding data science. Data science is all about finding and exploring data in the real world and using this knowledge to solve business problems. Some examples of data science include Customer prediction (A system can be trained on customer behaviour patterns to predict the likelihood that a customer will purchase a product)
 and Service planning (Restaurants can predict how many customers will arrive on the weekend and plan their food inventory to meet demand).
Now that you know what data science is, and before we dive into the topic of data science with Python, let's talk about Python.

If you are curious and interested in venturing into the field of data science, then python is one essential tool that you will need as you launch your data career. Python is one of the most popular programming languages, used widely by many programmers owing to its diverse usage in Its usage in data science, the Internet of Things, artificial intelligence, and other technologies. It also has rich mathematical or statistical features. 

Moreover, it's a really straightforward and beautiful language that encourages good coding practices. It is therefore highly advised for beginners. Since it combines data science tools and techniques with the expressive capability of a standard programming language, Python is particularly well-liked among data scientists.

There are a number of additional reasons, including:

Python is comparatively quicker than other programming languages in terms of speed.
Availability - There are numerous packages created by other users that are readily available and can be used.
Design objective: Python's syntax responsibilities are simple to comprehend and intuitive, making it easier to create applications with intelligible code.

Although there are other data science tools, such as mySQL and R, this post will concentrate on Python and how it may help with data science.

Python is a straightforward programming language to learn, and it supports certain fundamental operations like adding and printing statements. But, you must import particular libraries if you wish to undertake data analysis. Many instances include:

- Pandas is a tool for working with structured data.
- You may generate n-dimensional arrays with the aid of the robust library NumPy.
- SciPy - Offers scientific features like Fourier analysis and linear algebra
- Matplotlib: Mostly used for visualization.
- Scikit-learn is the program used for all machine learning operations.

There are additional libraries outside these as well, including:

- Networks & I graph 
- BeautifulSoup 
- OS 
- TensorFlow
Hello Dev.to - Looking for my next role, Cloud or Dev. CloudOps?
Tags: webdev, cloud, devops, career
Published: 2023-02-19 16:50:38

Hello Dev.to. Seems to be a new popular platform every few years. I also made a Fishbowl acct and have an Angel list.

We can't add gifs so here's an image.

https://stefs.site
https://www.linkedin.com/in/stefancaliaro/


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v0lqc81v4x2l2s4bf3ic.jpg)
Immutable State Variables in Solidity
Tags: solidity, ethereum, web3, blockchain
Published: 2023-02-19 16:45:05

>Immutable state variables are used to define storage identifiers that offer more flexibility as their values can be changed after declaration

State variables can be marked immutable which causes them to be read-only, but assignable in the constructor. The value will be stored directly in the code. Once values are assigned to immutable variables in the constructor, they cannot be modified later on.

The following code will throw an error, since we are trying to modify the value of the variable ‘a’ using a setter function, which is not allowed since ‘a’ is an immutable variable.
```
pragma solidity ^0.8.0;

contract TestImmutable {
    uint256 public immutable a;
    // This is a valid constructor
    constructor (uint256 _a) public {
        a = _a;
    }
    // This is invalid and will not compile
    function setA (uint256 _a) public {
        a = _a;
    }
}
```
It is important to know that the code that the compiler uses to create a contract will change the runtime code of the contract before it is returned. It will do this by replacing all references to immutables with the values that have been assigned to them. This is important if you want to compare the code made by the compiler and the code stored in the blockchain.

Immutable state variables in Solidity are variables that cannot be modified after the contract has been constructed. They can be declared using the keyword "immutable" and can be assigned an arbitrary value in the constructor of the contract or at the point of their declaration. Immutables are stored directly in the deployed bytecode, meaning that they are not stored at a fixed offset in storage like regular state variables.

Immutables are different from constant variables, which must have a fixed value at compile time and must be assigned where the variable is declared. Constant variables cannot access storage or blockchain data, while immutable variables can.

Immutables can be used to save on storage costs as they do not require additional storage space for their values. This makes them useful for storing values such as addresses, hashes, and other data that do not need to change over time. Additionally, immutables can help improve code readability by making it easier to identify which values are intended to remain unchanged throughout the lifetime of a contract.

For more content, follow me at - https://linktr.ee/shlokkumar2303
Create An EVM Compatible Blockchain Bridge——DB3 Network build in public weekly update (20230213-20230218)
Tags: web3, typescript, database, ethereum
Published: 2023-02-19 16:40:28

## Brief intro

We began to refactor our bill and gas system based, use the EVM chain to settle, and prepare for our network's economic model and the token release.

Besides, more CLI and db3.js features are implemented, such as:
- release a new [version](https://github.com/dbpunk-labs/db3/releases/tag/v0.2.8)
- Feat/delete doc in CLI 
- Create wallet/database/collection using [db3.js](https://github.com/dbpunk-labs/db3.js)

Brief pic about the [EVM chain settlement design](https://github.com/dbpunk-labs/db3/issues/203):

![db3-bridge](https://user-images.githubusercontent.com/8623385/219042374-257bdc1e-f017-488c-8619-fcf0386b9a8e.jpg)

---
## Key PRs:


### [use u64 to store the balance of bill and credit](https://github.com/dbpunk-labs/db3/pull/318)

### Code:

```
db3>-$ new-db
 database address                           | transaction id 
--------------------------------------------+----------------------------------------------
 0xa15c58bf6ee75980b753396adb4d878129a47468 | qx7NsYyUOKondVHQjG0/itneIAujJofKsUc39Sy0Bpc= 
db3>-$ show-account
 address                                    | bills        | credits       | storage_used | mutations | session | nonce 
--------------------------------------------+--------------+---------------+--------------+-----------+---------+-------
 0x539a6192e4fcd61f53772a3284c7734bc0f6f1d6 | 0.000000 db3 | 10.000000 db3 | 102.00       | 1         | 0       | 0 
db3>-$ show-state
 name       | state 
------------+---------
 database   | 1 
 collection | 0 
 documemt   | 0 
 account    | 1 
 mutation   | 1 
 session    | 0 
 storage    | 102.00  
db3>-$ 
```

### Detail:

Show network status in CLI; CLI could show the status of the following concept:

DB-related concepts:

- ​	Database
- ​	Collection: *aka 'table'* 
- ​	Document: *aka 'record'*
- ​	Mutation: *aka 'write into / update'*
- ​	Session: *aka ‘query’*
- ​	Storage: the storage size of your data

Account-related concepts:

- ​	Address: 
- ​	Bills:  bills are generated by the consumption of data mutation and storage
- ​	Credits: The credits are set by the initial number 10


### [refactor the bill and gas system](https://github.com/dbpunk-labs/db3/pull/312)

refactor the bill and gas system, 1 MB data storage will cost *1DB3*, you can experience it in our CLI tool.


### [Add EVM chain bridge](https://github.com/dbpunk-labs/db3/pull/319)

---

## Key issues opened:


### [refactor the bill and gas system](https://github.com/dbpunk-labs/db3/issues/203)

We began to refactor our bill and gas system and prepare for an economic model and the token release.

Help spread the work by giving us a star🌟 on [Github](https://github.com/dbpunk-labs/db3)



















​	

​