teleren/devto huggingface dataset:
Understanding Hadoop.proxy users
Tags: hadoop, authentication, advanced
Published: 2020-05-21 12:55:18

When you have a secure Hadoop cluster you need the ability of services to be able to authenticate and execute applications on behalf of the user.

If a service user with name *service_runner* wants submit a yarn job and access HDFS for user bob.  The *service_runner* user has kerberos credentials but bob does not, but the *service_runner* does not have the level of access the user bob does.  

It is required that user bob is used to connect to the namenode or the job tracker on a connection authenticated with *service_runner* kerberos credentials. In other words *service_runner* needs to impersonate user bob.

### Host level control
```xml
   <property>
     <name>hadoop.proxyuser.service_runner.hosts</name>
     <value>10.222.0.0/16,10.113.221.221</value>
   </property>
   <property>
     <name>hadoop.proxyuser.service_runner.users</name>
     <value>bob</value>
   </property>
```

*service_runner* can impersonate bob from 10.222.0.0-15 and 10.113.221.221

### group level control too open
```xml
   <property>
     <name>hadoop.proxyuser.service_runner.hosts</name>
     <value>*</value>
   </property>
   <property>
     <name>hadoop.proxyuser.service_runner.users</name>
     <value>*</value>
   </property>
```

*service_runner* can impersonate any user on the cluster from any host

### group level control close
```xml
   <property>
     <name>hadoop.proxyuser.service_runner.hosts</name>
     <value>*</value>
   </property>
   <property>
     <name>hadoop.proxyuser.service_runner.groups</name>
     <value>service_runner_execute</value>
   </property>
```
*service_runner* can impersonate any user that is in the service_runner_execute group

So when you are on boarding a new product to your Hadoop cluster adding the recommended setting might open your cluster to security issues, especially to malicious insiders.  Consider limiting to a known group of users and having your security explicit inclusion rather than open to all by default.

[link to the docs](https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Superusers.html)
My first pancake
Tags: octograd2020
Published: 2020-05-21 16:46:59

It's certainly difficult to chose one project out of the ones that I accomplished being a student. Though all tiny and simple, they are very precious to me, because with every project I learned new things and became a better programmer. That's why I just want to give tribute to my very first project, which was a basic mobile app for learning Portuguese words for Russian students.

<img src="https://i.imgur.com/oTEJ7JS.png" width="800" />

I started it when I didn't even have a clue about object oriented programming, but managed to make it work and have been using it ever since to polish my Portuguese vocabulary. 

Now, being better at mobile development, I realize how ugly that code is :see_no_evil:. In Russian there is a saying that literally translates into "the first pancake is always a mess". For me, building my first project was even more difficult than baking proper pancakes, and just like in that saying, it turned out to be a mess. But even though that ~~pancake~~ project was far from perfection, it was still my first and a pretty much ~~edible~~ usable one!

{% github https://github.com/hlnstepanova/vocabulario %}
E-Learning Platform
Tags: octograd2020
Published: 2020-05-21 16:11:54

The purpose of the project is to develop a website so that students can learn those programming languages which are taught in our University.
This website can help the students to learn the programming languages wherever and whenever they want to learn it. They do not have to wait for the lab turn. 
The students can play quiz and use the online compiler provided on the page to run their programs and check with the given answers. 
Using this automatic evaluation procedure the teacher of any particular course can evaluate and identify the student who cannot perform well and provide them with additional learning aids. This would help the student improve their grades.

The website is private to university therefore I can't share it, even if I did it still requires login.

## How I built it 
I developed this website with the following tools:
- Sublime Text
- Xampp Server 
- PHP
- MDBootstrap 
- Javascript
- CSS
- SQL
The sublime text was used as a text editor to edit PHP files. Xampp Server was used to host the PHP files as well as the SQL server. MDBootstrap is a bootstrap addon that makes building beautiful websites even easier.

The website contains login pages for the admin(instructor) and the student. Instructors can add new courses along with questions while students can answer them. Students have some more advantages, for instance, they are provided the questions according to their semester along with study material and guidelines.

The website works on a SQL server and all the read-write operations were optimized for better performance.

## Screenies
![image](https://i.imgur.com/5tnLeGs.png)
![image](https://i.imgur.com/sNL3tqD.png)
![image](https://i.imgur.com/b6nIpU0.png)

## Additional Thoughts
During the project I had discovered MDBootstrap that makes the website very easy to develop with modern designs and looks. hence, I liked it too much.
Which are the best credit repair software for 2020?
Tags: credit, saas
Published: 2020-05-21 19:51:06

Research shows us that around 1 in 5 customers face credit report errors that can badly affect their credit scores.

These problems can be caused by simple problems like typos or big issues like someone stealing your identity. A good credit report helps you get <a href="https://mc2.bid4papers.com/blog/homework/">some inspiration</a> for you.

Identity thefts are increasing more and more with many transactions happening online. The mistakes in the credit report can spoil your ability to successfully get credit.

Personal Credit Repair Software

With personal credit repair software many of these issues have an easy fix. You can easily find and correct mistakes in your report.One of the best tools doing your own personal credit restoration Credit Repair Magic

It is just $97 for a one time fee. You can manage credit repair for your family and friends as well at no extra charge. 

These types of programs access credit reports online and help track and manage dispute letters
As an individual it can be tough navigating the credit repair but this tool will prove very useful. 

Professional Credit Repair Software for Businesses

You’re an individual that is looking to help consumers with credit problems on a broader scale, you could look into software that has a much bigger customer relationship management capability.

Below are a few software that were created for people that run credit repair businesses.

Credit Admiral
This software has the capability to add unlimited users. The automation adds to the ease-of-use of the software. You can automate letters to send to the credit agencies as well as automate billing for your clients. There is a monthly fee which starts at $199 a month.

Turbo score
Turbo Score lets you handle a number of things like late payments, access public records, make inquiries, inquire about taxes and collections. These results are converted to easy to understand charts and graphs. With a 60-day money back guarantee if you’re dissatisfied for any reason you can ask for a refund.

Credit Repair Cloud — $179-$599 per month.
Credit repair cloud was founded in 2002.
This software is great for entrepreneurs that are looking to get into the credit repair industry as well as for established companies. They offer a few different plans with the cheapest starting at $179/month. There are customizable addons with each plan

Here’s a <a href="https://creditrepairreviews.co/reviews-of-the-best-professional-credit-repair-software">full list of tools</a> you can compare.
Hello! A small introduction from an artist and software engineer
Tags: self, introduction, artist, bootcamp
Published: 2020-05-21 18:12:26

Hello there! This is my first hello to the programming side of the online world.

![cartoon self waving](https://dev-to-uploads.s3.amazonaws.com/i/nmm9iz641xpahni8d6mp.png)

 After getting my B.A. and M.A. in Arts and Technology, I wondered what to do with my life. I’ve always been a creative person and had engineering-like qualities of wanting to solve problems and solve them efficiently, but narrowing down what exactly to become skilled in is hard. 

After a year of freelancing post-college, I became very frustrated one day. I hit a breaking point when designing a Wordpress site for a client, and realized that I was held back by my lack of technical knowledge. I hated that when I used the pre-made themes and templates, I had so much trouble making small tweaks and customized alterations. 

![cartoon self smashing computer in anger](https://dev-to-uploads.s3.amazonaws.com/i/865sfyei1aj7nhnrcefu.png)

When looking at the source code, I realized that if only I knew how all this worked, I would have freedom. It was an "ah-ha" moment. If I knew how to code, I would be free. Free to create what I wanted, free to solve the problems that had been eating away at me when I spent hours staring at the screen. 

Over the next few weeks, I had yet another breaking point where I wondered if this meant getting another college degree. I just finished college for crying out loud, I didn’t want to sacrifice yet another 4 or more years just to find a place in life, a career, a meaning. That’s when I came across coding bootcamps, and after hours of discussion with family and friends, and interviewing the bootcamp instructors, I realized that this was exactly what I was looking for. An intense dive into learning skills that would propel me forward, that would build off of what I already know, that would overcome the barrier between my ideas and tangible finished projects. This is what I wanted. 

The next few months involved doing prepwork and trying to learn to code on my own (when I wasn’t freelancing and angrily longing for programming skills). I didn’t just like it, I found it addicting. Getting that adrenaline rush when I overcame a logic problem and made something print out correctly on the screen… I knew this was the right path. 

![cartoon self with a walking stick about to set off on a journey to distance hills](https://dev-to-uploads.s3.amazonaws.com/i/bzymus6xjztlmbighwqv.png)

Now I’m in the midst of the bootcamp, coding around 10 to 12 hours a day, a complete novice, and only catching glimpses of just how deep the world of programming might be. I’m extremely excited to see where this path in life will take me, and I look forward to sharing my learning process, philosophical thoughts, and projects along the way with you!
py2cfg (joe-studer-18)
Tags: octograd2020
Published: 2020-05-21 19:33:29

## My Final Project

A fork of [Staticfg](https://github.com/coetaur0/staticfg), this is a pretty major improvement for creating call-flow graphs of python scripts. I created it as part of my CS4001 class, which focused on developing tooling to assist in the teaching & grading of an intro to python class (CS1500). In particular, my project is now used to help new CS students to understand the call-flow of a program in an intuitive manner, and to aid in the explanation of certain programming paradigms.

An example cfg generated can be seen above. This was run on a sorting class I created for my algorithms class my sophomore year. It highlights both insertion & merge sort.

## Demo Link
Here's a [link](https://pypi.org/project/py2cfg/) to the PyPi page. To download it & use it, just use 
```
pip install py2cfg
```

and to run

```
py2cfg <path/to/your/.py>
```

## Link to Code
The code is currently on a private university git repo, but we will be open sourcing it soon!

## How I built it (what's the stack? did I run into issues or discover something new along the way?)
This project was built as a fork of [Staticfg](https://github.com/coetaur0/staticfg), but turned into a signification rework. I ended up adding functionality for rendering classes & methods, highlighting user input locations, differentiating between true/false conditional branches, improving code formatting, highlighting different syntactical blocks (conditionals, loops, etc), adding flags for shortening long blocks of text and removing edge labels, and getting the project published on PyPi.

To accomplish this, I had to teach myself quite a few new tools:
  * Poetry -> Publishing the project to PyPi
  * Black -> Autoformatting a python file (without side-effects) before building the CFG
  * [Regex](https://regex101.com/r/w4oUxI/8) -> Shortening strings to a max character length before shortening with '...'
  * AST -> Necessary to identify Classes in the .py file and separate them off to improve readability.

Additionally, this project required that I leverage some other skills & tools I had learned over the years:
  * Python
  * Git Developing Practices
    * Version Control
    * Issue Tracking
  * Graphviz Python Library
  * Unit Testing
Array.sort() in Javascript
Tags: javascript, todayilearned, webdev, codenewbie
Published: 2020-06-08 18:26:04

In Javascript, **Array.sort()** is a built-in method of the Array Object. Using Array.sort(), we can sort arrays in descending or ascending order.  The default sort order is ascending order for the sort method. 

Different browsers use different sorting algorithms for Array.sort(). Mozilla uses merge sort while chrome's javascript V8 engine uses quicksort and insertion sort.  

## Syntax
```javascript
arr.sort([compareFunction]);
```
**[compareFunction]** is an optional argument of the sort method. It determines the sort order. If omitted, the values of the array will be converted to strings and compared based on their  Unicode code point values. 

```javascript
let arr = [9, 70, 44];
arr.sort(); 
// As no compare method is provided, 
// the array elements will be converted to strings("9", "70", "44") and // their unicode code point value will be compared.

console.log(arr);
// 44, 70, 9
```

## Compare Function

Compare Function takes two values in the array as parameters for comparing and deciding the sort order. You can define the condition for comparing the values, which will decide the sort order. 

```javascript
// A simple compare function to sort
// an array of numbers in ascending order.

function (a, b) {
  return a - b;
}
```

Compare Function decides the order of values based on the following conditions: 

- If it returns a negative number, the index of "a" will be lower than "b".
- If it returns a positive number, the index of "a" will be higher than "b".
- If it returns 0, it leaves the element at its place.


> Note: The array is sorted in place and the sort method also returns the sorted array.
Example: 
>```javascript
let arr = ["a", "c", "b"]
let sortedArr = arr.sort()
console.log(arr);
// ["a", "b", "c"]
console.log(sortedArr);
// ["a", "b", "c"]
```

Let's work with a few examples to understand Array.sort() better.

## Sorting numbers without compare function

```javascript
let arr = [9, 70, 44];
arr.sort();
// [44, 70, 9]
```

## Sorting numbers with compare function
```javascript
let compareFunc = (a,b) => a-b;
 
arr.sort(compareFunc);
//[9, 44, 70]
```

## Sorting strings

```javascript
let arr = ["John Doe","love","javascript"];
arr.sort();
//["John Doe", "javascript", "love"]
// Unicode code point value of first letter of every word is compared 
// and ordered in ascending order.
```

## Sorting an array of numbers and strings

```javascript
arr = ["John Doe", "eats", 3, "apples"]
arr.sort();
[3, "John Doe", "apples", "eats"]
// Number is converted to string and Unicode code point values of all
// elements are compared and ordered in ascending order.
```

## Sorting an array having undefined as an element
```javascript
// All undefined elements are sorted to the end of the array. 
// Compare function is not called for undefined. 

let arr = ["zoo","have", 4, "dino", undefined, "mammoth"];
//[4, "dino", "have", "mammoth", "zoo", undefined]
```
 ---

***This article was first published on [hackinbits.com](https://hackinbits.com/articles)***
Bridge Health Monitoring System using IoT🌉
Tags: octograd2020, iot, python, pwa
Published: 2020-05-22 09:38:18

In this post, I'll be describing about the **Undergraduate Capstone Project** that I created along with my teammates
Parth Doshi @parthketandoshi
Ajinkya @ajinkyatungare24

Infrastructures are subjected to constant corrosion making them vulnerable to degradation. Of all different types of structures, bridges are the most vulnerable as they are exposed to various natural factors and if the corrosion is not checked, it can lead to loss of Human Life and property. An IoT based Structural Health Monitoring System can allow us to collect real-time information about different parameters from the bridge and prevent a disaster from happening.

# Audio Analysis using python.
#    
### Description
When we consider the sound a surface makes on impact with a hard object - the sound for a hollow material compared to a dense material will be different. Considering this we can analyze a sample of audio of a dense material and the same dense material over time when it deteriorates. We know that over time it will sound different if it has any deformities or cracks Making use of this idea we created an application.

### Description of the application
This is a python based application which takes two audio recordings and compares them, outputs their respective [Mel’s spectrogram](https://librosa.github.io/librosa/generated/librosa.feature.melspectrogram.html)
and calculates the numerical difference of the two audio files. Here the first file will be of a recording of the bridge in perfect health and in perfect condition. Over time the bridge will have a certain degree of deterioration. This time another audio sample will be taken and this time it will be compared to the initial audio file in the python based audio analysis application.
The numerical difference will be calculated and Mel’s Spectrogram of both the audio files will be plotted to visually notice any changes.
![Spectrogram](https://dev-to-uploads.s3.amazonaws.com/i/rr89s5lyey79lm2od8yu.png)

### End Result
We will have the audio sample difference over the interval and the authorities can keep a note of all the changes happening in the bridge and check for any deformities or abnormalities in the bridges. For inspections too the data from the audio analysis sample can help figure out which parts of the bridge are facing deterioration. The application also has a system to send the data through email to the authority - the email will have the two spectrograms and the result data.

![Basic](https://dev-to-uploads.s3.amazonaws.com/i/r9vsxxc09x4y9lzu46a2.png)

### Future Scope:
- Making use of Robotics to automate the process of capturing data on the sites
- Using machine learning models to generate the desired output without difference

### Image Analysis using Python
{% link https://dev.to/parthketandoshi/bridge-health-monitoring-system-using-iot-3ppc %}

### Hardware Module using Arduino
{% link https://dev.to/ajinkyatungare24/bridge-health-monitoring-system-using-iot-47bh %}
100 Days of SwiftUI — Day 2
Tags: 100daysofswiftui
Published: 2020-05-22 10:09:50

---
title: 100 Days of SwiftUI — Day 2
published: true
date: 2020-05-22 10:07:29 UTC
tags: 100daysofswiftui
canonical_url: https://zeitschlag.net/100-days-of-swiftui-day-2/
---

The second day of a hundred took me like 20 minutes. Today's topics were more [complex data types](https://www.hackingwithswift.com/100/swiftui/2): [arrays](https://developer.apple.com/documentation/swift/array), [dictionaries](https://developer.apple.com/documentation/swift/dictionary), tuples and [enums](https://docs.swift.org/swift-book/LanguageGuide/Enumerations.html) and when to use each of them.

I learned, that you can provide a `default`-value when accessing a dictionary using [`subscript(_:default:)`](https://developer.apple.com/documentation/swift/dictionary/2894528-subscript). When there's no value assigned to the key, you get your `default`-value back. And although I don't use [enums with associated values](https://docs.swift.org/swift-book/LanguageGuide/Enumerations.html#ID148) very often, it was nice to be reminded about them.

At [UIKonf 2020](https://uikonf.com), [Conrad Stoll](https://twitter.com/conradstoll) gave an interesting talk about state driven development using enums in Swift, so one day, these associated values might come in pretty handy. [Here're some sketchnotes of the talk](https://twitter.com/felibe444/status/1262826752071647233).

<!--kg-card-end: markdown-->
Fixed: Simple Screen Recorder records sound only with a black screen - Fedora 32/30/31
Tags: simplescreenrecorder, blackscreen, fedora, linux
Published: 2020-05-22 11:28:07

Hello, I've heard some people having issues with Simple Screen Recorder. In this article, I'll guide you on fixing this issue.



Your need to Configure Xorg as the default GNOME session. 

On your terminal open your ***`custom.conf`*** by typing this command: 

```
sudo nano /etc/gdm/custom.conf
```

and uncomment 

```
WaylandEnable=false
``` 

If it's commented but must be set to 

```
false
```

Then, on the [daemon] section just under ***WaylandEnable=false*** add this line: 

```
DefaultSession=gnome-xorg.desktop
``` 

and save the file. Then restart your system and try running your Screen Recorder program again.

Congratulations!

However, if ***`nano`*** command is not working please try installing it by running the command:  

```
sudo dnf install nano
``` 

or 

```
sudo apt-get install nano
``` 

Whichever one works for you. Thanks a lot for your time.
Access VS Code from your phone browser...
Tags: vscode, productivity, javascript, webdev
Published: 2020-05-22 11:58:26

So in my [last post](https://dev.to/dotnetdreamer/using-android-phone-as-a-development-machine-3f39) I explained how to use your phone as a development machine. But this time I want to show you, how you can access your code from your phone browser.

# How it works ?
Basically you will host your PC (probably at office or another home device) and then access it from home via **phone or any other** device. For this you will need a PC (where you should have already installed VS Code) and a Microsoft account. First you will need to install [Remote Development Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack) published by Microsoft. 

After installation, open a project that you want to access and go to **Remote Explorer** and Double click on **Register self-hosted Codespace** (as shown in below image), select subscription, resource group, region, a plan and finally name this Codespace. Don't worry its free 😜 as mentioned [here](https://docs.microsoft.com/en-gb/visualstudio/online/overview/what-is-vsonline).

![Steps to create region](https://dev-to-uploads.s3.amazonaws.com/i/1uac8vfj87bpcqv6yc0i.gif)

After downloading some dependencies (in my case) and setups at Microsoft cloud, you should see your Codespace as shown below 😉:

![Codespace](https://dev-to-uploads.s3.amazonaws.com/i/c0i0bv6ujwtrqmmty72a.png)

# Connect it!
Perfect, all you need to do now is to grab your phone and plug it to a monitor with keyboard and mouse and go to [https://online.visualstudio.com/environments](https://online.visualstudio.com/environments). There you will see the Codespace that you named it in previous steps (in my case ik-surface-pro). Click on those dots and select **Connect**. 

![Connect](https://dev-to-uploads.s3.amazonaws.com/i/f1yqqhfyc40o46wo2fhm.png)

Thats it 😍, after a while you have now access to your code from a browser, which means from anywhere! 😉

![VS Code](https://dev-to-uploads.s3.amazonaws.com/i/59vpujqmhl92int5vgu3.png)

# Gotchas
While this all sounds cool but please note that the experience isn't perfect but it is nearly perfect. Also in mobile (specially in Android) as you touch VS Code, the screen will be zoomed in. For that I used [Firefox Focus browser](https://play.google.com/store/apps/details?id=org.mozilla.focus). You might need to try different browsers and see which one works best.