teleren/devto huggingface dataset:
Quick note. Latest Solana Cli cannot be installed on Windows
Tags: solana
Published: 2022-04-15 07:49:06

I'm trying to install Solana cli on my Windows 11 ([manual](https://docs.solana.com/cli/install-solana-cli-tools)).

In the section of Windows, the doc gives this command to install solana cli.
```
C:\solana-install-tmp\solana-install-init.exe v1.10.8
```

However, v1.10.8 cannot be installed, this should be because the latest release [Testnet - v1.10.8 release](https://github.com/solana-labs/solana/releases/tag/v1.10.8) does not include Windows binary.

I used the latest released version of mainnet [v1.9.16](https://github.com/solana-labs/solana/releases/tag/v1.9.16).

In the future, the same issue will exists with different versions if Solana team does not provide windows binaries for Testnet releases.

It may help people using Solana cli on windows. Good luck.
Setup MongoDB in Node.js with Mongoose
Tags: mongodb
Published: 2022-04-15 06:42:38

## Setting up database connection

```
npm install mongoose --save
```

**First let import the dependency;**

```
const mongoose = require("mongoose");
```

Then let’s store the path of the database in a variable. The path should look like the following, with and being replaced with a user you have created for the database.

```
const dbPath = "mongodb://<dbuser>:<dbpassword>@ds250607.mlab.com:38485/test-db";
```


 connect to the database.

```
mongoose.connect(dbPath, {
    useNewUrlParser: true,
});
```

```
module.exports = mongoose;
```

Once the application is started, it would be better if there was an indicator showing whether the application successfully connected to the database or not. So let’s add some more code to fix that.

```
const db = mongoose.connection;
db.on("error", () => {
    console.log("> error occurred from the database");
});
db.once("open", () => {
    console.log("> successfully opened the database");
});
```

In the end the database.js should look like this.

```

// database.js
const mongoose = require("mongoose");
const dbPath = "mongodb://<dbuser>:<dbpassword>@ds250607.mlab.com:38485/test-db";
mongoose.connect(dbPath, {
    useNewUrlParser: true,
});
const db = mongoose.connection;
db.on("error", () => {
    console.log("> error occurred from the database");
});
db.once("open", () => {
    console.log("> successfully opened the database");
});
module.exports = mongoose;
```

## Setting up models/schema

```
// models/userModel.js
const mongoose = require("../database");
const schema = {
    name: { type: mongoose.SchemaTypes.String, required: true },
    email: { type: mongoose.SchemaTypes.String, required: true },
    password: { 
        type: mongoose.SchemaTypes.String, 
        required: true, 
        select: false
    }
};
const collectionName = "user"; // Name of the collection of documents
const userSchema = mongoose.Schema(schema);
const User = mongoose.model(collectionName, userSchema);
module.exports = User;

```


```
// Create user
User.create({
    name: name,
    email: email,
    password: password
});
// Find user by email
User.findOne({
    email: email
});
// Find user by email with the password field included
User.findOne({
    email: email
}).select("+password");
```
How to Approach a Machine Learning Problem ?
Tags: machinelearning, deeplearning, datascience, python
Published: 2022-04-15 06:40:27

## **Step-1 : Frame the Problem**

As a first step, you need to arculate your problem by
identifying the type which depends on your business
problem.

Type can be anything like Binary classification,
Unidimensional regression, Multi-class single-label
classification, Multi-class multi-label classification,
Multidimensional regression, Clustering (unsupervised),
Other (translation, parsing, bounding box id, etc.)

## **Step-2 : Get the Data**

- The next step is to get the data and store it the right
format according to your problem statement.

- Analyse your data to check whether you have enough
data or not and also check the quality of the data.

- The quality of the data fundamentally determines if
you will be able to solve the problem at all or not.

## **Step-3 : Data Pre-Processing**

- After having the data next step is to analyse it and
extract insights to make business decisions.

- Also, apply basic data preprocessing operations to
bring the data in a go to go format.

- Choose the right library.

## **Step-4 : Evaluation Metric**

- The most important step is to know how to evaluate
our results.

- We need to choose the right evaluation metric
according to the problem we are going to solve.

- For example - if we have an imbalance dataset then
we usually choose the ROC-AUC metric.

## **Step-5 : Split the data**

- In any machine learning problem, we split the data
into multiple sets like training, validation and test.

- Stratified splitting is mostly used for classification
problems and K-Fold for regression problems.

- The most important thing to note is whatever
operations you apply on the train set must be
applied to validation and test set.

## **Step-6 : Apply ML Algorithm**

- And finally, we will apply ML models to the data. We
can't say which models work best it's just hit and
trial.

- Applying multiple algorithms do hyperparameter
tuning, evaluate the results and choose the best
model which gives satisfying results.

- Benchmark your solution based on your selected
evaluation metric.
Create Github Pages in the mint language
Tags: mint, crystal
Published: 2022-04-15 05:28:00

When executing the mint build command, several options need to be added.

See: https://github.com/mint-lang/mint/discussions/543

> you need to add the --relative flag, since now it tried to load the index.js from the root domain, so the full build command is:

```
mint build --skip-service-worker --relative
```

Have a nice day!
Hidden GitHub features that you have not used before
Tags: github, beginners, webdev, programming
Published: 2022-04-15 05:14:57

Hidden Github features that you have not used before

🔥  Github’s Web-based editor
The web-based editor is a free, lightweight editor environment to create and commit code changes directly from your repository. You can open any GitHub repository in the web-based editor in the following ways:

Pressing the dot ( . ) key while browsing any repository on GitHub.

🔥  Opening GitHub Jupyter Notebooks directly in Colab
You can also open a Github notebook directly in Colab. Replace github with githubtocolab in the URL, leaving everything else untouched. This opens the same notebook in Colab.

🔥 Keyboard Shortcuts
t - quickly jump through files (similar to cmd+T in VI or Text Mate)
w - quickly switch branches
s - search
? - keyboard shortcuts help

🔥  Creating a profile-level README
You can also customize your GitHub profile page to include information that you would like to showcase.

- The Github profile Readme is a public repository containing a README .md file and appears at the top of your profile page.

- All the content you want to showcase on your Github page should be included in this README .md file. However, there are few points to keep in mind:

- The name of the repository should match your GitHub username. For example, if your username is octo, the repository name must be octo.

- The repository should be public. There should be a README .md file in the root of the repository, and it should be populated with some content.

🔥  Octotree
Octotree is a browser extension that enhances GitHub code review and exploration. It helps you navigate directories and open files with a familiar tree-like structure.

Don't forget to drop a like 🔥
Where should you invest the most to land an interview at FAANG?
Tags: programming, help, discuss, career
Published: 2022-04-15 05:08:58

- Github
- Resume 
- LinkedIn 
- Experience at a smaller company

I run a private study group for engineers who are serious about getting jobs in Big Tech, [signup here](https://krsrgcc7aju.typeform.com/to/gtc87nLC?typeform-source=fangprep.substack.com).

Need advice on how to break into Big Tech? [Join the discord](https://discord.com/invite/M8944Xz26m)
Automated Installation of vRO Plugin using Python
Tags: article, tutorial, automation, plugin
Published: 2022-06-08 08:39:12

---
title: Automated Installation of vRO Plugin using Python
published: true
date: 2022-04-15 05:08:05 UTC
tags: ARTICLE,Tutorial,Automation,Plugin
canonical_url: https://cloudblogger.co.in/2022/04/15/automated-installation-of-vro-plugin-using-python/
---

If you are looking for a way to quickly install plugins in your vRealize Orchestrator `(.dar or .vmoapp` files), you can try this python script which uses vRO ControlCenter API at its core.

### **Prerequisites**

- Python 3 installed
- Download the plugin that you want to install to a local folder. For demo purpose, you can download a small plugin called JsonPath from [here](https://cloudadvisors.net/wp-content/uploads/2016/05/o11nplugin-jsonpath-1.0.2.zip).
- vRO Control Center credentials
- Copy **[vRO\_Install\_Plugin\_via\_Python\_1.0.py](https://gist.github.com/imtrinity94/38ca08e7253e404a95386e56ff9be6fc)** which is available at [https://gist.github.com/imtrinity94/38ca08e7253e404a95386e56ff9be6fc](https://gist.github.com/imtrinity94/38ca08e7253e404a95386e56ff9be6fc)

## **Understand the process**

For demo purpose, I will show the very few steps that you need to install a vRO plugin named JsonPath in an automated fashion.

- Copy the full path of downloaded plugin with filename itself. 
  - `C:\Users\x213816\Downloads\cloudblogger tutorial\o11nplugin-jsonpath-1.0.2.vmoapp`

![](https://cloudblogger2021.files.wordpress.com/2022/04/image-7.png?w=735)

- Keep **FQDN** of vRO and vRO Control Center root **credentials** handy.
- Go to Visual Studio Code or your choice of IDE to run the **[vRO\_Install\_Plugin\_via\_Python\_1.0.py](https://gist.github.com/imtrinity94/38ca08e7253e404a95386e56ff9be6fc)** python script. 

![](https://cloudblogger2021.files.wordpress.com/2022/04/image-8.png?w=1024)

- Click **Run** ► and provide values for asked fields

![](https://cloudblogger2021.files.wordpress.com/2022/04/2022-04-15-11_16_32-launchpad-75.154.146.35-remote-desktop-connection-1.jpg?w=953)

- **Reload** vRO ControlCenter, the desired plugin will be already installed there.

![](https://cloudblogger2021.files.wordpress.com/2022/04/image-9.png?w=924)

* * *
Convert any image to tiny, sussy AmongUs Characters ඞඞ
Tags: python, showdev
Published: 2022-04-15 05:06:47

This project is honesty hilarious.

{% twitter https://twitter.com/DhravyaShah/status/1514828684762677250?s=20&t=nlTD4BwXcuo5jVt1Q4-kyA %}
*Yes, that's my voice. Yes, my voice is funny.*

## What is it
SussyImage is a joke project because, you guessed it, I was bored. Inspired by reddit's r/place, I thought it would be cool if I could make a project that could use small images to imitate an image. I already had a little bit knowledge of OpenCV2, so making the actual thing wasn't the challenge: Making it somewhat efficient was. 

The image don't have to be AmongUs characters, but for me (and well, the entire internet), Amongus is extremely funny, so I have included an amongus character pack in the repository, which is set to the default image directory.

Here's the github repository, it's a very simple project
If you liked it EVEN ONE BIT, please star it lol ⭐⭐ 

{% github https://github.com/dhravya/sussyimage %}

Follow me on twitter - [or just browse through my tweets](https://twitter.com/dhravyashah)

Follow me on Github - https://github.com/dhravya


If you liked this article even a little bit, make sure to 💖 it, or follow me here on Dev.to
{% twitter https://twitter.com/DhravyaShah/status/1514296308986617856?s=20&t=nlTD4BwXcuo5jVt1Q4-kyA %}
Serendipia
Tags: dart, opensource, spanish, cloud
Published: 2022-04-15 04:57:25

![Serendipia](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/64d4bxvu0ilmpv3j3v5j.png)

Serendipia es un servicio sencillo de puerta de enlace RESTfull (Representational State Transfer) para descubrimiento, equilibrio de carga y tolerancia a fallos.

> **Timmy:** Esto es Eureka en chiquito?
> **Ushieru:** No. Aquí venimos a cometer errores desde cero y a aprender Timmy.

Una implementación simple, pequeña y muy útil para microservicios pequeños (por ahora). Un proyecto para aprender mas sobre cloud y microservicios.

Fácil de implementar para que conectes rápido, sin esfuerzo y vayas directo a lo tuyo: programar.

## Por que dart? 🤔
Porque me gusta el lenguaje, y tenemos ejecutables binarios 😏.
(Aunque el primer prototipo lo hice en TS, ya tenemos mucho contenido en Español de TS y JS, diversifiquemos un poco).
El proyecto es sencillo. Tan sencillo que puede ser rescrito en Go, Rust, C o C++. La idea es que sea compilado para poder descargar el binario y tirar para adelante.

## Comida rápida? 🍕
Interesante genealogía, pero sí, algo parecido. Descargas el ejecutable, lo corres y ya esta! ni siquiera tienes que tener Dart instalado. Ves la magia? Sin complicaciones (como otras implementaciones como Coff... Coff... Eureka, nada contra Java. I love Java 💘 mi Github lo confirma)

## El futuro?
Hacer una implementación sencilla y clara donde alguien sin previos conocimientos pueda empezar a aprender de microservicios, load balance, API Gateway, tolerancia a fallos. Cloud en general.

## Muchas gracias 🤝
Estas vacaciones me han dado un poco de tiempo libre para programar por mero gusto y que bien me ha caído. Te invito a que me dejes tu feedback, tus dudas, tu opinión o un simple saludo para que podamos llegar a mas personas.

Gracias por leerme, te dejo el [repositorio](https://github.com/ushieru/serendipia) y Happy Hacking 🧑‍💻🎉
Top Node JS Frameworks for Web App Development
Tags: nodejsframeworks, node, express, webapp
Published: 2022-04-15 04:49:09

NodeJS is one of the essential frameworks in the web development sector. It has added a lot value and have brought great ease as well as pace in the web development process. NodeJS frameworks have their own uniqueness and they are accordingly used in developing various effective solutions. This content would give brief details on the features and reasons to use particular NodeJS framework. Read the full article - https://net2.com/best-nodejs-frameworks-for-web-apps-in-2022/
Attacking Application Tips
Tags: cybersecurity, bugbounty
Published: 2022-04-15 00:13:39

Attacking Application:

Attacking applications can be as simple as drag and drop while sometimes it can take weeks to make successful attack. Jumping directly into scripts, trying random stuff won't help every time but proper map. Have your map up on screen to minimize risks of distraction. 

Map can save your hours even weeks from trying random stuff to no output. Clear goals, your methodology, footprinting, and scanning in map will let you explore hidden functionalities, directories and domains in application. Trying shodan, Google and Github dorking will increase your chances of finding more juicy stuff. 

My methodology:
I do start attack by:
- Nmap, Gobuster, and Waybackurls 
- Google, Shodan, Github dorking 
- Subdomain enumeration, brute forcing endpoints "helps in finding sensitive information and directory traversals" 

After scanning and footprinting, I do review everything till that moment, I already have stuff required to launch successful attack. To be honest, I do try scripts, automation tools and oneliners at the end of day to review stuff left uncovered. 

Manual attack not only helps me out in understanding each step but adding more knowledge and experience to my skills. Automation helps in enjoying fancy screens and scripts running down the screen as if am getting video taped for hacking movie. LOL 

#hacking #cybersecurity #networksecurity #ethicalhacking #penetrationtesting
How to access the laravel .env variables inside javascript
Tags: laravel, javascript, beginners, tutorial
Published: 2022-04-15 04:40:06

## What is .env?
Its environment variables file. In simple terms, it is a variable text file. In this file we set a variable with a value that you wouldn't want to share with anyone, the purpose of the file is kept secret and secure because in.

While working on your Laravel project, you may want to have some dynamic behavior based on your environment. For example, you want to set the database connection settings, or you want to specify the application's URL.

Laravels way of dealing with this is by providing a .env file. This file can contain any variable, which can hold different values on all your environments (dev, test, live, etc..), and can be read by Laravel. This gives a very convenient way of manipulating the behavior of our application in these different environments.

Please note that most information about the Laravel framework can be found in the official documentation. This article offers a little more detail in some cases.

In the Laravel framework, this place will be in the resources/js/bootstrap.js file. If you open this file for the first time, you can see the next lines:
```
window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
```
In this very place, we can add any common header that we need (just like the X-Requested-With header). So, let’s do that and appropriate headers add here for the Authorization Bearer token and for the accepted content-type (for example):
```
window.axios.defaults.headers.common['Authorization'] = 'Bearer <TOKEN>';
window.axios.defaults.headers.common['Accept'] = 'application/json';
```
But… it is so weird and not secure to keep the token in this file. So, yep, we could get this token from the environment variable. If you use a laravel-mixer for your project, you can achieve it easily.

First of all, you can add to your .env file a new variable, API_TOKEN for example:
```
API_TOKEN=9ccc75raaa5-3easdsadd2-asdsad-8sdsdsb0-asdfrwedasd
```
We can always use this variable in our project on the backend. But if you want to use it on the frontend — just add something like that in this very file:
```
MIX_API_TOKEN="${API_TOKEN}"
```
And now you can use this variable in your JS files like process.env.MIX_API_TOKEN. So we need to change an appropriate header in the bootstrap.js file:
```
window.axios.defaults.headers.common['Authorization'] = `Bearer ${process.env.MIX_API_TOKEN}`;
```
That’s it.

Thank you for reading this blog.
100 Days of Swift - Day 10
Tags: swift
Published: 2022-04-15 04:38:19

Continuation of [Hacking With Swift](https://www.hackingwithswift.com/) [100 Days of Swift](https://www.hackingwithswift.com/100)

**Day 10 - Classes**

Straight outta the intro we are let known the main difference between structs and classes. Classes enable inheritance in our code, and if you come from a OOP background you already know the importance of this feature.

Overriding methods is done by using the `override` keyword, and in order to avoid a class from being further extended you can always use the `final` keyword.

Another big difference is that structs are value types while classes are reference types. This means that copying the instance of a class and modifying a property results in the property value being changed on both variables, while if try the same with a struct each variable will hold a different value.
My react-query clone implementation for dependant API fetching custom hooks
Tags: javascript, react, webdev, codenewbie
Published: 2022-04-15 04:24:17

In my current working on React manga website using MangaDEX API, I want to put down some notes

My custom hook for getting a manga detail
```js
function useMangaDetail(mangaId, { enable = true } = {}) {
  const [manga, setManga] = useState(null);
  const [loading, setLoading] = useState(true);

  useEffect(() => {
    // if false then will not excute
    if (!enable) {
      return; // end it
    }

    (async () => {
      try {
        setLoading(true);
        const result = await mangaApi.get(mangaId);
        setManga(result.data);
      } catch (error) {
        console.log('Failed to fetch manga id=', mangaId, error);
      }

      setLoading(false);
    })();
  }, [mangaId, depEnable]);

  return { manga, loading };
}
```

In the chapter reading page, we need to get manga info depended on the mangaId fetch from chapter detail data
```jsx
function ChapterReadPage() {
  const { chapterId } = useParams();
  const { chapter, mangaId: mangaIdOfChapter } = useChapterDetail(chapterId);

  const { manga } = useMangaDetail(mangaIdOfChapter, { enable: !!mangaIdOfChapter });
  const mangaEnTitle = manga?.attributes?.title?.en;

  return (
     ...
  );
}
```
Using React to improve the state (ha) of my library
Published: 2022-04-15 03:52:27

My coding boot camp experience is coming to an end, and of course I'm a little sad. It's been incredibly rewarding to learn so many new skills in such a short amount of time, and I love the feeling of being challenged that comes in a classroom environment.

That being said, I'm ready to have a little free time back. Because I really, _really_ miss reading.

<img width="100%" style="width:100%" src="https://media.giphy.com/media/bslzwg9Qkl0aY/giphy.gif">

Before I started coding, books were my go-to whenever I had a spare minute. In 2021, I read 100 books (read: too many). This year, I'll be lucky to hit 10. Because of that, I often find myself glancing longingly at my [GoodReads](https://www.goodreads.com/) account and remembering the good ol' days.

That's what inspired my React project [pageturner](https://github.com/rayleighrozier/pageturner). It's a slimmed-down book tracking app that focuses on your progress, rather than the social networking aspects of similar applications. You can search, add and log books, and sort them into different shelves. It uses [Google Books API](https://developers.google.com/books) to display information about different books, then tracks your progress using a [Supabase](https://supabase.com/) database. This was a great way to practice my React and Redux skills, especially because it required MANY more components than I initially planned for.


If you'd like to check out this project, it's on GitHub [here](https://github.com/rayleighrozier/pageturner).
# Create user with all privileges in PSQL and add to db
Tags: postgres, database, psql
Published: 2022-04-14 23:36:27

Check psql if is installed `psql --version` if you don't have installed then install from [official page](https://www.postgresql.org/)  when installed make sure can see something like this
```bash
psql (PostgreSQL) 14.2 (Ubuntu 14.2-1.pgdg20.04+1+b1)
```
check status of psql `sudo service postgresql status` look like this
```bash
● postgresql.service - PostgreSQL RDBMS
     Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
     Active: active (exited) since Thu 2022-04-14 17:20:08 -04; 3s ago
    Process: 38001 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
   Main PID: 38001 (code=exited, status=0/SUCCESS)

abr 14 17:20:08 alfredo systemd[1]: Starting PostgreSQL RDBMS...
abr 14 17:20:08 alfredo systemd[1]: Finished PostgreSQL RDBMS.

```
If service psql is **inactive** only need  `sudo service postgresql start`

Run this *command* for create user 
```bash
sudo -u postgres createuser testuser
# For crete db
sudo -u postgres createdb testdb
```
Now we make setting for nice work with that user and the database
First enter to psql
```bash
sudo -u postgres psql
```
For see all user list  you can run  `\du`
when see all user list we cannot see any roles even doesn't exist password for this user ,  we need add some privileges **inside db (postgres)**
```bash
ALTER USER testuser with encrypted password 'secret';
# If this command run success, message look like this
# ALTER ROLE
grant all privileges on database testdb to testuser;
# GRANT
```
when list again with `\l` the database has attach to new user
i created rattle_weather_forecast
Tags: python, showdev, productivity, webdev
Published: 2022-04-15 03:38:53

Hello i created rattle_weather_forecast it helps you to know the weather of any place in the earth it gives you atmospheric conditions temperature etc.Download rattle_weather_forecast from our official website

Official website:https://rattleofficial.github.io/
Official github:https://github.com/rattleofficial