teleren/devto huggingface dataset:
Left Rotate The Array
Published: 2022-07-18 13:26:43

Today let's see how to left rotate the array 

This left rotate question can have say to rotate 1 digit to left or n digit to left lets see both in this post 

1. Left Rotate By 1 Digit 
2. Left Rotate by N Digit

> Bonus:- lets look into collections built-in rotate for right and left rotate 


lets see left rotate by 1 Digit 

```
int[] reverseTheArrayByOne(int[] arr) {
    int temp = arr[0];
    for (int i = 1; i < arr.length; i++) {
      arr[i - 1] = arr[i];
    }

    arr[arr.length - 1] = temp;
    return arr;
  }
```
Since we are going to move only one digit we can store the first digit in temp and moving the rest of the elements towards left and we will add the temp to the last index.

Lets see N rotate 

We can simply perform N rotate by running the rotate 1 digit N times to get the answer 
```
int[] reverseTheArrayByNTimesEasy(int[] arr, int digits) {
    for (int i = 0; i < digits; i++) {
      arr = reverseTheArrayByOne(arr);
    }
    return arr;
  }

```
or we can use this method 

```
int[] reverseTheArrayByNDigits(int[] arr, int digits) {
    int[] temp = new int[digits];
    for(int i=0;i<digits;i++){
      temp[i]=arr[i];
    }
    for(int i=0;i<arr.length-digits;i++){
        arr[i]=arr[digits+i];
    }
    for(int i=0;i<temp.length;i++){
        arr[digits-1+i]=temp[i];
    }
    return arr;
  }
```
To rotate N digits we can make use of temp array to store the N digits and move the remaining digits to the beginning and copy the temp array to the last


> Bonus :-  we can simply use collections rotate method to perform this array Rotate 

```
int n = 1; 
int[] arr = {2, 5, 8, 9, 12};
    List<Integer> arrList = 
Arrays.stream(arr).mapToObj((e) -> Integer.valueOf(e)).collect(Collectors.toList());
    Collections.rotate(arrList,n);
    System.out.println(arrList.toString());
```
Here n is the number of digits to be rotated, by default Collections.rotate will perform right rotate to if you want left rotate means you can give negative value.

Collections.rotate(arrList, 1) will perform Right Rotate
Collections.rotate(arrList,-1) Will Perform Left Rotate
googleapi: Error 404: No bot associated with this project., notFound
Tags: go
Published: 2022-07-18 13:14:28

`msgService := chat.NewSpacesMessagesService(service)
    msg := ChatCard("Title", "Subtitle", data)
    // msg := "hello"
    fmt.Print("Now ChatCard Method called\n")
    _, err = msgService.Create("spaces/AAAAwlgqHZg", msg).Do()
    if err != nil {
        fmt.Println(err)
    }`

I'm going to connect to google chat But a google API error occurs, Any help would be appreciatable?
My git aliases
Published: 2022-07-18 13:09:57

I'm lazy.

Every day I need to sync up branches in git to account for the following:

- Changes made to the remote `main` branch
- Changes made to the current branch from the origin

In looking for ways to make to some simple shortcuts, I found Nicolas Fränkel's blog post on [Creating Git shortcuts](https://blog.frankel.ch/creating-git-shortcuts/) and [How to get the name of the current git branch into a variable in a shell script?](https://stackoverflow.com/questions/2111042/how-to-get-the-name-of-the-current-git-branch-into-a-variable-in-a-shell-script) to be particularly helpful.

By using the techniques described in each of these articles in concert, I have defind the following git aliases.

## open

Opens the current folder in Visual Studio Code.

```
alias open="code ."
```

## get-branch

Sets `$branch` as the current branch.

```
alias get-branch="branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')"
```

## sync-branch

Pulls the branch set to `$branch` from the origin.
```
alias sync-branch="git pull origin $branch"
```

## sync-main

Pulls the remote `main` branch into the current branch.

```
alias sync-main="git pull upstream main"
```
Why Node.JS
Tags: node, javascript, beginners
Published: 2022-07-18 13:06:31

If you're looking to build a web application, you have a few different options. You could go with PHP, Java, or even Python. But if you want the best performance and scalability, you should choose Node.JS. Here's why:

Node.JS is lightweight and fast

Node.JS is built on Google's V8 JavaScript engine, which is designed for high-performance applications. This means that Node.JS apps are generally faster and more responsive than other types of web apps.

Node.JS is scalable

Node.JS applications can easily be scaled up or down, depending on your needs. If you need to add more users or handle more traffic, you can just add more servers. And if you need to reduce costs, you can simply remove servers.

Node.JS is efficient

Node.JS is designed to be efficient, meaning that it uses less resources than other web application platforms. This makes it ideal for large-scale applications that need to handle a lot of traffic.

Node.JS is easy to use

Node.JS is based on JavaScript, which is one of the most popular programming languages. This makes it easy to learn and use for both developers and users.

Node.JS is flexible

Node.JS applications can be written in any text editor, and they can be run on any operating system. This makes it easy to develop and deploy Node.JS applications.

Node.JS is open source

Node.JS is an open source platform, which means that there is a large community of developers who contribute to its development. This makes it easy to find help and support when you need it.

Node.JS is secure

Node.JS comes with several security features, making it a safe platform for developing web applications. Some of the security features include the ability to encrypt data, restrict access to files and directories, and create secure passwords.

Node.JS is enterprise-ready

Node.JS is suitable for developing large-scale enterprise applications. It comes with several features that make it easy to develop, deploy, and manage node applications.

Final Thought 

Node.JS is the best platform for developing web applications. It is lightweight and fast, scalable and efficient, easy to use and flexible, secure and enterprise ready. If you're looking to build a web app, Node.JS is the way to go.
Cómo implementar variable fonts
Tags: programming, webdev, performance, spanish
Published: 2022-07-18 13:03:32

Antes de aprender a implementar variable fonts, tenemos que entender qué son, y para esto primero debemos entender la diferencia entre estilo tipográfico y familia tipográfica.

Un estilo tipográfico es un tipo de letra único y específico, como puede ser regular o **bold**.

Un estilo tipográfico es un tipo de letra único y específico, como puede ser regular, o regular italic, o bold italic.

Dicho esto, podemos definir a las variable fonts como un solo archivo que contiene todos los estilos. Es decir, podemos tener la familia entera, dentro de un solo archivo.

Ahora si, vamo a codea.

## 1) Descargar una variable fonts.
Para este ejemplo vamos a descargar [Roboto Mono desde Google Fonts](https://fonts.google.com/specimen/Roboto+Mono?query=roboto&preview.text_type=custom).

- Hacemos click en el botón "Download family", eso descargará un archivo comprimido.
- Descomprimimos el archivo.
- Vamos a tener un folder llamado Roboto_Mono y en su raíz un archivo RobotoMono-VariableFont_wght.ttf. Ese es nuestro archivo!

## 2) Definir la variable fonts.
Una vez que tengamos descargada nuestra font, necesitamos definirlas en nuestro proyecto y para eso usamos la regla `@font-face` de CSS de tal manera que nos quede algo así:

```css
@font-face {
  font-family: 'Roboto Mono';
  src: url('/fonts/RobotoMono-VariableFont.ttf') format('truetype-variations');
  font-weight: 100 700;
}
```

Del código anterior, tienes que en cuenta dos cosas:

- Si bien es un archivo `.ttf` el format es levemente distinto al que estamos acostumbrados.
- En la property `font-weight` definimos el rango en el cual podemos mover el peso de la font. Acá no podemos definir cualquier valor, sino los que la font acepte. Google Fonts nos indica cuales son estos límites.

![font weight limits](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g6pdu8ipxvk6dn94blao.jpg)

## 3) Usar las font definida.
Ya descargamos nuestra font y ya está definida, lo que resta simplemente es utilizarla y esto se hace igual que con cualquier otra font.

Por ejemplo:
```css
p {
  font-family: 'Roboto Mono';
  font-weight: 548; /* Acá podemos usar cualquier valor entre 100 y 700 */
}
```
## 4) Optimizar, siempre optimizar.

Si llegaste a este punto sin problemas y ya tienes tus variable fonts andando, te recomiendo que pases por el post en el que doy algunos consejos sobre [cómo optimizar tus fonts](https://dev.to/luchopenafiel/web-performance-fonts-hpo).
How do you suggest I write a quick, excellent LinkedIn Profile?
Published: 2022-07-18 12:55:05

LinkedIn is a professional app, so you don’t want your profile to be anything less than exceptional. A great [LinkedIn profile writing service in UAE](https://www.cvmaker.ae/linkedin-profiles.php) is one way you can stand out, access opportunities, and make valuable connections on the platform. So your profile should summarize who you are, including everything about your career journey and your abilities.

Here are some tips on how to write a great LinkedIn profile.
1.	Choose the right professional avatar and wallpaper
2.	Write a catchy headline
3.	Write the perfect profile summary that tells your story
4.	Add your "related" skills
5.	If you are a freelancer or consultant, please highlight the services you provide
6.	Highlight your educational background and work experience
7.	Get your colleagues or clients to recognize your skills and make suggestions
8.	Include your volunteer experience
9.	Add a link to your portfolio to showcase your previous work
10.	Demonstrate your skills by taking a skills assessment test
11.	Post content regularly and comment on people's posts
How To Accept Crypto Payments in Your SaaS With Keagate
Tags: webdev, programming, tutorial, productivity
Published: 2022-07-18 12:47:40

{% embed https://www.youtube.com/watch?v=dxMZIbeRJac %}

[Keagate Repo](https://github.com/dilan-dio4/Keagate)

[Keagate API](https://dilan-dio4.github.io/keagate-example-swagger/)
Node.js For Beginners
Tags: node, javascript, nextjs, webdev
Published: 2022-07-18 12:37:29



Node.js is a javascript runtime built on Chrome's V8 javascript engine. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient.

Features

Node.js provides a rich library of modules that brings many features to web applications such as HTTP request handling, file system access, networking, and much more.

Modules

Node.js has a simple module loading system. Modules are loaded using the require keyword.

var http = require('http');

The above line loads the http module into the variable http. Node.js has many built-in modules available through the require keyword.

NPM

Node Package Manager (NPM) is a package manager for Node.js modules. It is used to install, uninstall, and manage modules for use in Node.js applications. NPM is included with Node.js and can be accessed using the command line interface.

Installing Modules

[object Object] can be installed using the NPM install command.

npm install http

The above command will install the http module and any dependencies required for the module to function. The modules are installed in the node_modules folder in the current directory.

Creating Modules

Modules can be created and published to NPM for use in Node.js applications. Modules are generally created in a directory with a package.json file that contains metadata about the module.

The following is an example of a simple module named mymodule.

var mymodule = require('mymodule');

mymodule.sayHello(); // outputs "Hello!"

Modules can be published to NPM for use by the Node.js community.

Conclusion

Node.js is a javascript runtime built on Chrome's V8 javascript engine. It is used to create web applications and APIs. Node.js has a simple module loading system and many built-in modules. NPM is used to install, uninstall, and manage modules for use in Node.js applications. Modules can be created and published to NPM for use by the Node.js community.
Synchronous and Asynchronous Programming
Tags: webdev, devjournal, programming, performance
Published: 2022-07-18 12:32:26

**_Synchronicity_** refers to the way our code is executed. We usually have two programming models **Synchronous** and **Asynchronous** ( aka sync & async ).
Those models are used to build APIs , event-based architectures and helps to decide how to handle long-running tasks. 
**📌​ <u>It's important to choose when and which method to use.</u>**
In this blog, we'll discover when we should apply async programming and when using the sync method is the best option.

let’s start by identifying the difference between asynchronous and synchronous programming.

- 
In **Synchronous** programming, code is executed sequentially. This means that tasks are processing one at a time, if one task is not completed the other once are blocked.


![sync prg](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t4xu80ge6lqqirakzoo3.png)

- However, **Asynchronous** programming guarantee that all tasks will be carried out in parallel. Which means that your code will continue to be executed no matter the status of the previous tasks.


![async prg](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/146v5bx8ww3uvu3x2xlp.png) 

**When to use sync programming:**
When it comes to sync programming it's relatively complex. It may over-complicate things and makes it hard to deal with code. 
On the other hand, it's fairly clear method, its code is easier to write and doesn’t require tracking and measuring process flows (as async does). It could be appropriate for a shopping app, for example.

**When to use async programming:**
Async programming is ideal when we aim to create projects with a huge number of iterations. Thus, steps doesn't require to have fixed sequences, it assures that the process of developing is growing simultaneously. 

**Conclusion** 
When it comes to choosing async or sync methods, none of them is inherently better. You just need to pick the most optimal solution for your project requirements. 

👩‍💻​🧑‍💻​🧠​ ..
Here's something I'm building with no code
Tags: startup, showdev, design
Published: 2022-07-18 12:19:02

Hey guys, I work as a full time product designer but enjoy tinkering with side projects in my spare time.

I've designed and built [companies.tools](https://www.companies.tools). It's where tech teams like Sketch, Loom, Descript, Make, Zapier and tons of others share which apps they use to research, design, code and market their product (and so much more).

One of the "killer" features I have is an embeddable dynamic widget. By having all this data of who uses which apps I'm able to generate a list of "used by" logos pulled straight from the list of teams that said to use this particular product. Every product that has at least 3 teams added it to their app stack can generate a small code snippet and insert it to their landing page. It will update dynamically according to teams using/deleting it and lots of other benefits to it. I even have a [comparison](http://companies.tools/static-vs-widget) with a static row of client logos.

I'd be happy to publish some of your products (we're currently in closed beta and only publishing hand picked products). Use publish form to submit :)
longest common sequence leetcode
Tags: subsequence, solution, python, longestcommonsequenceleetcode
Published: 2022-07-18 12:05:26

We are going to solve a Hard coding Problem longest common sequence leetcode. LeetCode Link of the Problem is HERE. It is one of the most difficult sequence finding tasks on leetcode. We have tried to Solve this in Python3.

Question
Given two strings text1 and text2, you have to return the length of their longest common subsequence leetcode. If there is no common subsequence, you have to return 0.

The solution to the problem is here
Read more at https://hecodesit.com/longest-common-sequence-leetcode/

#leetcode #sequence #longestcommonsequenceleetcode #python #solutions
Coding Period GSoC'22 | Week 4 + 5
Tags: gsoc, productivity, career, opensource
Published: 2022-07-18 12:03:54

This blog is about my progress for week 4 and Week 5. I implemented the import and export of circuit-files and Mobile Touch Compatibility tasks.

## Work Done(Week 4 + Week 5)

These two weeks were full of fun and learning new things. It began with the completion of the import and export of circuit-files task. In the fifth week of the coding period, I and [Aman](https://github.com/aman-singh7) started working on the Mobile Touch Compatibility task. We also had a meeting with mentors to discuss about the Touch Compatibility task.


Work Sample :

{% embed https://youtu.be/HrdA-dnsA5A %}


**Open Pull Requests**

- [Added Tests for Force-Gate](https://github.com/CircuitVerse/CircuitVerse/pull/3221)
- [Fix: Testing of CombinationalCircuits on UI](https://github.com/CircuitVerse/CircuitVerse/pull/3204)
- [Completed Mobile Touch compatibility](https://github.com/CircuitVerse/CircuitVerse/pull/3236)


## What Next...?

We will complete the Mobile Touch Compatibility task and will fix the codeClimate issues .
After completing the above tasks, we will start with my next task which is custom alert and prompt dialog boxes 🎉.


That's all for now; stay tuned for more updates😉.


<center>

<img src="https://i.gifer.com/6eZ.gif" />

</center>
Session @ Analytics Vidhya Data Hour
Tags: opensource, tutorial, transformers, machinelearning
Published: 2022-07-19 07:51:15

---
title: Session @ Analytics Vidhya Data Hour
published: true
date: 2022-07-18 11:58:09 UTC
tags: opensource,tutorial,transformers,machinelearning
canonical_url: https://julsimon.medium.com/session-analytics-vidhya-data-hour-18903af150ee
---

My session for [Analytics Vidhya](https://www.analyticsvidhya.com)’s Data Hour is now online. Get ready for a 1-hour grand tour of [Hugging Face](https://huggingface.co): preparing data with [datasets](https://github.com/huggingface/datasets), training and predicting with [transformers](https://github.com/huggingface/transformers), sharing on the hub, deploying with the Inference API, building a web app with Spaces, and quantizing with [Optimum](https://github.com/huggingface/optimum). My most complete session yet. Enjoy :)

{% youtube -5PPi2Nmb8k %}
What is Luos, really? How we built the speech
Tags: luos, opensource, startup, embedded
Published: 2022-07-18 11:46:55

This article discusses the evolution of our thinking about Luos. 📷 https://luos.io/blog/what-is-luos-really-how-we-built-the-speech… While Luos is the name of the technology and the company behind it, it's the technology in particular that we're going to talk about, and how we've sometimes struggled to explain it.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/566ps448onseuui0zgz0.png)
Install NVM on windows
Tags: nvm
Published: 2022-07-18 11:45:39

Go to Link : [Releases · coreybutler/nvm-windows](https://github.com/coreybutler/nvm-windows/releases)

Download : **[nvm-setup.exe](https://github.com/coreybutler/nvm-windows/releases/download/1.1.9/nvm-setup.exe)**

Installation : run as administrator.

Open Command Prompt : run as administrator.

```jsx
nvm

nvm ls available

// example
nvm install 16.16.0

nvm use 16.16.0

nvm current
// 16.16.0
```
Is Small Business Web Design Helps with Conversion?
Tags: webdev, programming, design
Published: 2022-07-18 11:35:53

In many cases, the website is one of the most vital elements for small businesses. It is the main way the business gets to attract clients and market services and products, so it is the very heart of the sale process.

But how do you get from design to great conversion rates? According to our experience as a custom web design company, you need a site that’s awesome!

While this is a general explanation, it is true that an aesthetically pleasing design will make your viewers stop and browse. This happens because the site is easy on the eyes, creating a user-friendly interface that keeps people entertained while offering a wonderful browsing experience.

A beautifully designed site is impressive and keeps users engaged as they browse through pages. Even more, it’s important to make sure the design supports the essence of your business so users don’t get confused and leave. This is why the services of a custom web design company are more than needed when you put together the interface. A company like ours has the experts and the necessary resources to help create gorgeous and affordable designs for small businesses.

Top 3 Awesome Small Business Sites
Since images are more powerful than words, let’s take a look at some of the most beautiful sites that not only convert but boost the business to the top.

#1: 4 Rivers Smokehouse
The design is simple but it speaks volumes to curious viewers or returning customers. Using parallax scrolling, the site uses gorgeous images to make you think about delicious food and fantastic flavors. It only takes a few moments for the design to catch your attention and, even if you don’t usually like meat, you may want to drop by just for a salad.

As a Milwaukee-based web design company, we helped create many similar designs for local restaurants and coffee shops. The secret is in the images and the journey you make the user take while browsing.

#2: Cliffside Industries


Small businesses come from all sorts of niches, so a custom web design company must adapt to every client’s needs. In the case of Cliffside Industries, the design is clean and follows a more traditional line. This site is created as a luxurious catalog with an elegant interface and lots of navigation options that make browsing a true pleasure!

Their strong point is represented by high-quality images and the ingenious use of the available white space.

#3: Hello Baby


The design in this case is light but highly responsive. Users get more information as they interact with the site – they are not bombarded with useless details from the start. This is a great technique that helps with keeping viewers entertained and offering them exactly what they want when they want it.

The technique is called flat design and it is very popular among small businesses today as it makes things simple for the user. It’s easy to implement, but requires the attention of a professional custom web design company.


Please here for more details-
https://symphony-software.com