teleren/devto huggingface dataset:
Build a CI Pipeline With GitHub Actions to Automate Tests.
Tags: python, programming, devops, webdev
Published: 2022-01-10 23:42:54

Test-driven development (TDD) and test automation are great ways to reduce bugs arising from subsequent changes.


It's widespread to run tests inside the continuous integration (CI) pipeline. It takes away a ton of precious developer time from the repetitive testing tasks.


A fantastic option we have to build CI pipelines is GitHub Actions. Using GitHub as the code repository, you can set triggers and run tasks in a workflow. These tasks automatically start whenever you push changes to the repository.


Despite solving a complex problem, GitHub Actions are surprisingly straightforward to configure. In this short article, I've discussed,
    - how you can set up a CI pipeline to run tests;
    - how to customize even triggers;
    - how to schedule tests in cycles, and;
    - how to use environment variables in tests;

Try it out, and let me know what your thoughts are. How can we make it better? What alternatives do we have? What are your practices in testing software before release?

[How to Run Python Tests on Every Commit Using GitHub Actions?](https://towardsdatascience.com/github-automated-testing-python-fdfe5aec9446?sk=5896e323396c3d1bbb4b603dce715cca)

If you enjoyed reading this post, ___please share___ it in your network. Would you also leave 50 claps in Medium to help the post reach more people?
Paracetamol.js💊| #2: ¿Qué imprime este código?
Tags: javascript, spanish, webdev, beginners
Published: 2022-01-10 22:56:38

¿Qué crees que imprime el siguiente código?

```js
const arreglo = [true, 33, 9, "-2"];

const f = (arr) => {
  return arr.map(Number)
}
const res = f(arreglo)
console.log(res)
```

a) `[1, 33, 9, -2]`
b) `[boolean, 33, 9, string]`
c) `[null, 33, 9, null]`
d) `[undefined, 33, 9, undefined]`

---

Puedes ver la respuesta en el primer comentario.
"Shebang, I'm your father."
Published: 2022-01-10 22:54:26

"Shebang, I'm your father." Today we celebrate the birthday of the shebang. Forty-two years ago, Dennis Richie, [the spiritual father of the shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)), wrote the following: `The system has been changed so that if a file being executed begins with the magic characters #! , the rest of the line is understood to be the name of an interpreter for the executed file.` And so, the she(ll)bang is born.

It's not the only birthday to celebrate today. Kaboom Shebang is going live and will share the 10th of January with the Unix shebang. 🎈

We write articles and publish presentations on subjects like digital technology, programming, cyber security, blockchain, data science, and the web. The first article is coming up.

https://www.kaboomshebang.com
https://dev.to/kaboomshebang

`#shebang #kbsb #kaboomshebang #unix #birthday #goinglive`
Binary Search Templates Final Version
Tags: java, algorithms, programming
Published: 2022-01-10 22:53:21

You need to write it over and over again

# Find the first number bigger than target

```java
/**
 * return the first number bigger than target
 *
 * @param nums   0, 1, 2, 3, 4, 5, 6, 7
 * @param target 5
 * @return 6
 */
private int binarySearchTargetRight(int[] nums, int target) {
    int l = 0, r = nums.length - 1;
    while (l < r) {
        int mid = l + r >> 1;
        if (nums[mid] > target) {
            r = mid;
        } else {
            l = mid + 1;
        }
    }
    return l;
}

```

----
# Find the last number smaller than target
```java
/**
 * return the last number smaller than target
 *
 * @param nums   0, 1, 2, 3, 4, 5, 6, 7
 * @param target 5
 * @return 4
 */
private int binarySearchTargetLeft(int[] nums, int target) {
    int l = 0, r = nums.length - 1;
    while (l < r) {
        int mid = l + r + 1 >> 1;
        if (nums[mid] < target) {
            l = mid;
        } else {
            r = mid - 1;
        }
    }
    return l;
}
```
Things I wish I knew before starting a relational database
Published: 2022-01-10 19:43:33

# Why relational DAG
- Checks on data inegrity means you can pass your project to the maintainers
- Lower barrier to try out ideas on old data 

Ability to try new features without breaking existing workflow

No-code parallization with linear scaling (up to n channels sppedup for preprocessing)

Workflow graphics

No-extra-work unit testing (in theory) 

No extra work for usage documentation. This frees up devs to document features/science 



# Engineering process pointers
- Write two schemas at a time, one you're thinking about now and its child
- First, populate a few recording sessions, not all datasets
- Once the current schema and its child seem to work fine, get them populating and move on the the next node. 
- Work on whole analysis simultaneously - no need to wait for all step to finish. 
- Can start next as soon as a few keys have populated. 
- My data entry stage is during recording when I make the filename 
- Keep Datetime as primary key for restrictions on populate calls (Not so sure anymore)
- If you work on children and parents simultaneously,  parents may not show up for a while. Wait until mysql processes them first.

# Organizational principles
- Separate phases of analysis: ingestion/condensing, chunking, computation, organization, plotting
- baby steps at the top, cram many at the bottom - bottom is high overhead due to multiplication of keys (eg events), whereas dropping top nodes means recalculate all children

- For populate calls, restrict by list of sessions if you suspect that some are not populating due to errors
- if not all items are showing up at the end of populate, repeat with reserve=False
- start with reserve=False for schemas that require little cpu
# Gotchas
- Fractional primary keys must be stored as decimal  (10,30)
How to connect android screen to pc over WI-FI
Tags: tutorial, android, mobile
Published: 2022-01-10 21:43:28

First, we have to have activated the usb debugging option on our android, that option is available in the developer options. To activate developer mode you must investigate on your device.

Download scrcpy from your official [site](https://github.com/Genymobile/scrcpy)

Once connected we must go to the folder where we have put it and run the terminal in that folder in my case cmd in windows.

![scrcpy installation folder](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3xc9wrxmjf5ivf5f77jw.png)

Having connected our Android device, run to list all devices connected.

```
adb devices
```
![Running the adb devices command](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qkkaliw217xvk9pyryr6.png)

As we can see we see the connected devices, now we run a server in local network.

```
adb tcpip 5555
```
![Running the adb tcpip 5555 command](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mdfye6m3x171pewsl3zq.png)

It is necessary that the laptop and the mobile are in the same network now in the configurations of the mobile we check the ip of the mobile and run.

```
adb connect <ip_addres_mobile>:5555
```

![Getting the ip of the mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hya7fypajdu9c091e30v.png)

![Connected to the mobile via wifi](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jh0lnd4nst10mgq75yhb.png)
 
We can check with the command to list and something like this will appear (with the mobile disconnected from the usb).

![Verifying the connection with the mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8bx3gbvz1tsipyswzjo.png)

Now run scrcpy.exe

![Illustrative image of the connection with the phone](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bic6ido3dfo9znw0gw1h.jpeg)

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/M4M1EJOMG)
Next.js GraphQL Apollo Server Starter Project
Tags: nextjs, graphql, typescript, react
Published: 2022-01-10 21:42:08

## Next.js Graphql apollo server starter 

Next.js Graphql apollo server starter , with merge schema , combine resolvers generate type in fast and simple way

### Github Repo
[https://github.com/idurar/next-js-graphql-apollo-server-starter](https://github.com/idurar/next-js-graphql-apollo-server-starter)



### Install

```
yarn Install
```

### Generate schema and Type

```
yarn generate
```

### Getting Started

First, run the development server:

```
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

can be accessed on [http://localhost:3000/api/graphql](http://localhost:3000/api/graphql). This endpoint can be edited in `pages/api/graphql.ts`.

Image cover : thanks to [https://unsplash.com/@tateisimikito](https://unsplash.com/@tateisimikito)
Animated Education Website with HTML CSS JS
Tags: css, tutorial, javascript, beginners
Published: 2022-01-10 21:32:12

{% youtube 1ygRRP-y9pw %}

How to make animated education website using html css javascript

In this video, I will show you how to create (mobile-first responsive) animated education website.

---

HI 👋
I'm Sadee (webdev)
In this channel I make videos about Complete Responsive website.
You can checkout my channel 👇

📺 My Channel : [codewithsadee](https://www.youtube.com/channel/UC1PZHWV6VvICTL1LgFUZq6g)
🔔 Subscribe : [subscribe now](https://www.youtube.com/channel/UC1PZHWV6VvICTL1LgFUZq6g?sub_confirmation=1)
🕐 New Videos Every Week

---

🔗 Essential links
-----------------------------
[All Images](https://drive.google.com/file/d/1wMROFZ-ljUVzXdcWPqSC-DFJIr00XPLb/view?usp=sharing)
[Text](https://drive.google.com/file/d/1VDUOCQh1cM9_ZyDKZXKakqH9I9sOs84o/view?usp=sharing)
[Font - Roboto](https://fonts.google.com/specimen/Roboto)
[Font - Jost](https://fonts.google.com/specimen/Jost?query=jost)
[Ionicon](https://ionic.io/ionicons)
[Source Code](https://www.patreon.com/posts/source-code-60993085?utm_medium=clipboard_copy&utm_source=copy_to_clipboard&utm_campaign=postshare)

---

⏱️ Timestamps
-----------------------------
0:00 - Demo
3:18 - File structure
3:50 - Html initial
4:28 - Css variables & reset
7:21 - Header section
18:31 - Home section
30:34 - Category section
38:14 - About section
44:11 - Course section
58:17 - Event section
1:07:22 - Features section
1:13:32 - Instructor section
1:21:08 - Testimonials section
1:26:25 - Blog section
1:33:29 - Contuct section
1:36:13 - Footer seciotn
1:45:59 - Css Animation
1:52:49 - Javascript
1:53:55 - Media queries 


---

💜 Like - Follow & Subscribe Me
-----------------------------
Twitter : https://twitter.com/codewithsadee
Github : https://github.com/codewithsadee
YouTube : [codewithsadee](https://www.youtube.com/channel/UC1PZHWV6VvICTL1LgFUZq6g)
Buy Me A Coffee : https://www.buymeacoffee.com/codewithsadee
Patreon : https://www.patreon.com/codewithsadee

---

[![Buy Me A Coffee](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9kn6vwn4mulhsx6o69is.png)](https://www.buymeacoffee.com/codewithsadee)
Quickly build and deploy Nodejs lambda to AWS with Terraform
Tags: node, lambda, terraform, aws
Published: 2022-01-10 21:24:53

To kick us off we want to install [create-aws-tf-lambda](https://www.npmjs.com/package/create-aws-tf-lambda) utilizing your preferred nodejs package manager.

**NB**: before we start make AWS account, save the secret and access key in your environment variables or  configure it using aws cli

## Install create-aws-tf-lambda

`npm i create-aws-tf-lambda -g`

## Create project

Make a new a projet/lambda by running the the following command

`create-aws-tf-lambda`


![create-aws-tf-lambda](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9rof6h437lmqazdt3unq.png)

cd into the orderStatus project and run build

`npm run build`

cd into terraform directory, run terraform init then plan and apply

`
terraform init
terraform plan
terraform apply
`

congratulations you have deployed your lambda to AWS in less than 60 seconds.
Eat Bananas in K Hours
Tags: 100daysofcode, algorithms, java, programming
Published: 2022-01-10 21:18:38

# Description

You are given a list of integers `piles` and an integer `k`. `piles[i]` represents the number of bananas on pile `i`. On each hour, you can choose any pile and eat `r` number of bananas in that pile. If you pick a pile with fewer than `r` bananas, it still takes an hour to eat the pile.

Return the minimum `r` required such that you can eat all the bananas in less than or equal to `k` hours.

**Constraints:** 

- `n ≤ 100,000` where `n` is the length of `piles`
- `n ≤ k`

## Example 1

### Input

```
piles = [6, 4, 3]
k = 5
```

### Output

```
3
```

### **Explanation**

```
At r = 3 bananas per hour, we can eat the first pile in 2 hours, eat the second in 2 hours, and eat the last pile in 1 hour.
```

---

# Intuition

binary search

- l: at least eat `1` banana
- r: the maximum number of bananas in a pile

# Implementation

```java
import java.util.*;

class Solution {
    public int solve(int[] piles, int k) {
        int n = piles.length;
        int l = 1, r = Integer.MIN_VALUE;
        for (int pile : piles) {
            r = Math.max(pile, r);
        }

        while (l < r) {
            int mid = l + r >> 1;
            if (canEat(mid, piles, k)) {
                r = mid;
            } else {
                l = mid + 1;
            }
        }
        return l;
    }

    private boolean canEat(int r, int[] piles, int k) {
        int hours = 0;
        for (int pile : piles) {
            hours += Math.ceil((float) pile / r);
        }
        return hours <= k;
    }
}
```

## Time Complexity

- Time: O(nlogn)
- Space: O(1)
What is Nullish Coalescing Operator 
Tags: javascript, nullishcoalescingoperator, newtopic
Published: 2022-01-10 18:26:53

---
title: What is Nullish Coalescing Operator 
published: true
description: In this blog we will learn about Nullish Coalescing Operator.
tags: #javascript,#nullishcoalescingoperator,#newtopic 
//cover_image: https://direct_url_to_image.jpg
---

We all have some questions about Nullish Coalescing Operator.

# what is Nullish Coalescing Operator ?
  -> Nullish Coalescing Operator is denoted using "??".
 -> ES11 has added the nullish coalescing operator.

Let's understand with a simple expression 

```javascipt
x ?? y   // This is expression 
```

In the above expression,
-> If x is either null or undefined then the result will be y.
-> If x is not null or undefined then the result will be x
-> This will help make condition check code easy task
 


# Why JavaScript Needed the Nullish Coalescing Operator
 The or  Operator ( || ). That work good. but sometimes  we want to evaluate when the first operand is only either null or undefine.Now Come Nullish Coalescing Operator solved this problem.  

There is some code you can try and understand this operator 

```javascript
let result = undefined ?? "Hello";
console.log(result); //  this print Hello

result = null ?? true; 
console.log(result); // this print true

result = false ?? true;
console.log(result); // this print false

result = 45 ?? true; 
console.log(result); //  this print 45

result = "" ?? true; 
console.log(result); // this print ""


result = [1, 2, 3] ?? true;
console.log(result); // this print  [1, 2, 3]

```


Notes :
 if you don't know about operator and operand let see below code

```javascript 
   1 + 2 
```

 OPERATOR: Above code, The + is an operator. Operators are used to performing specific mathematical and logical computations on operands.
 OPERAND : Above code 1 and 2 are operands 


I hope you have found this tutorial useful and thank you for taking the time to follow along!
Chat App
Tags: atlashackathon, mongodb, react, node
Published: 2022-01-10 20:38:55

## Instructions
`npm i`
`npm run dev`

---

## Overview of My Submission

Hi, I'm Eren and I study at Eskisehir Technical University as a Computer Science 2. grade student. I made a realtime chat app called SprinkaiChat with MERN Stack. I made this site to improve my coding skills. I used MongoDB technologies and MongoDB Atlas. To use my app just create an acount, log in, join a room and chat with other people!

---

## Submission Category: 

### _Choose Your Own Adventure_

---

## Link to Code

### Github
{% github https://github.com/ErenKarakaya01/RealtimeChatApp-MERN %}


### Website
https://sprinkaichat.herokuapp.com

---

## Additional Resources / Info


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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d391dkaitb8pqo6rmq7t.png)
MongoDB Atlas Hackathon e-commerce with MongoDB
Tags: atlashackathon, mongodb, vue, javascript
Published: 2022-01-10 20:31:59

### Overview of My Submission
I have create a simple full-text search for products, A user can search a product with right any text on input field and hit search than MongoDB Atlas search do the job for me. User can search on basis of different fields and get the desire recordes.
I also create a simple schedule trigger to get the daily order report which will get all the orders on daily basis and create a single entity for single day and add it in a dailyorderreport schema.


### Submission Category: 
I have choose E-Commerce Creation & Action Star for my project.

### Link to Code

Fronend Repo {% github https://github.com/zaahmed-nisum-com/nisum-vuejs-streamingweb %}


Backend Repo {% github https://github.com/zaahmed-nisum-com/nodeJS-workshop-nisum %}

### Additional Resources / Info
Did't use any

[Note:] # Screenshots/demo videos

![full text search](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ff8yrn2vsdg66aeb53ku.gif)
![Trigger for daily order ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wtrgmbmyqbms12rmc8k6.gif)

App pages urls
# full text search page
https://watchnowweb.herokuapp.com/search
# today order trigger event 
https://watchnowweb.herokuapp.com/orders/todayorders
What to do when macOS keyboard writes wrong special characters
Tags: macos
Published: 2022-01-10 20:31:19

At the moment I always have an external Keyboard connected to my MacBooks over a USB-C Dongle when I am working. From time to time the keyboard layout switches after waking the laptop up again after a couple of minutes. For example, it starts to write `^`  where normally the `<` is. This is my current solution to fix this issue.

## Check Keyboard settings
First of all, check the keyboard settings in `Settings -> Keyboard -> Input Sources` if anything changed. Sometimes this can change since macOS has the default shortcut of `^`(control) + `space` set. I already had the scenario that I miss pressed this shortcut and changed it to a different input source.

## Delete the Keyboard preferences file
Since this is most often not the case and my input source is on DE which is my default I try to reset the keyboard settings. When connecting a keyboard for the first time macOS asks which key is next to the left `shift` key on the connected keyboard. To toggle this dialogue again one has to delete a `plist` file. This is where macOS stores its’ settings.

The *keyboardtype.plist* of the current user can be found in `~/Library/Preferences/com.apple.keyboardtype.plist` so removing that is possible with the following command  

```bash
rm ~/Library/Preferences/com.apple.keyboardtype.plist
```

If this file is not available in the home Library there should be one in the root */Library* of macOS. This can be found in `/Library/Preferences/com.apple.keyboardtype.plist` and can be removed with the following:

```bash
sudo rm /Library/Preferences/com.apple.keyboardtype.plist
```

After removing the file(s) remove the keyboard from the macOS device and restart it. After restarting the computer log in to the desired user and plug the keyboard back in. macOS should then show you the wanted keyboard setup screen again. After setting up the keyboard again the special keys should work as expected again.

Thank you for reading, 
Niklas
Building a VS Code extension with Rust, WebAssembly, and TypeScript
Tags: vscode, rust, webassembly, typescript
Published: 2022-01-10 20:20:24

New post out on how we built a VS Code extension with Rust, WebAssembly, and TypeScript Dive in to walk through our design decisions in building the extension, how an IDE extension works and more.

https://www.osohq.com/post/building-vs-code-extension-with-rust-wasm-typescript
Lowest Sum of Pair Larger than Target
Tags: java, programming, 100daysofcode, algorithms
Published: 2022-01-10 19:57:53

# Description

You are given a list of integers `nums` and an integer `target`. Return the lowest sum of pair of numbers that is greater than `target`. You can assume that a solution exists.

**Constraints:** 

- `2 ≤ n ≤ 100,000` where `n` is the length of `nums`

## Example 1

### Input

```
nums = [1, 3, 5, 9, 13]
target = 8
```

### Output

```
10
```

### **Explanation**

```
We pick 1 and 9
```

---

# Implementation 1

```java
import java.util.*;

class Solution {
    public int solve(int[] nums, int target) {
        int n = nums.length;
        int ans = Integer.MAX_VALUE;
        Arrays.sort(nums);
        for (int i = 0; i < n - 1; i++) {
            int pair = binarySearchTargetRight(nums, i + 1, target - nums[i]);
            int sum = nums[i] + nums[pair];
            if (sum > target) {
                ans = Math.min(ans, sum);
            }
        }
        return ans;
    }

    private int binarySearchTargetRight(int[] nums, int l, int target) {
        int r = nums.length - 1;
        while (l < r) {
            int mid = l + r >> 1;
            if (nums[mid] > target) {
                r = mid;
            } else {
                l = mid + 1;
            }
        }

        return l;
    }
}
```

## Time Complexity

- Time:
- Space:

---

# Implementation 2

```java
import java.util.*;

class Solution {
    public int solve(int[] nums, int target) {
        Arrays.sort(nums);
        int l = 0, r = nums.length - 1;
        int ans = Integer.MAX_VALUE;
        while (l < r) {
            int sum = nums[l] + nums[r];
            if (sum > target) {
                ans = Math.min(ans, sum);
                r--;
            } else {
                l++;
            }
        }
        return ans;
    }
}
```

## Time Complexity

- Time:
- Space: