teleren/devto huggingface dataset:
Supply chain for paper valuation
Tags: ethereum, solidity
Published: 2020-05-13 12:54:58

---
title: Supply chain for paper valuation
published: true
description: 
tags: Ethereum,Solidity
---

We all had moments when our grade improved from F to A. And let me ask this, have you got your money back? You get the money, but you have to chase after the office staff, right?
What if all these valuation processes were automated to some extent.
What if you knew..

If the college submitted your paper?
If the valuators checked the paper?
What were the marks assigned by each valuator?
Could I raise a dispute (Apply for revaluation) on the go?
Can I get a copy of my answer sheet at any point in time without having permission from college or university?

Entering blockchain…

What if we can create a supply-chain for answer paper? Allowing the students to know the status of the valuation. All the details are stored permanently in an immutable ledger. And the best part is you don’t have to see this anymore. 🌚🌚

![](https://miro.medium.com/max/1400/1*xHeKu4nbsvjLbUuyAGlMNg.jpeg)


The data is available 24*7 on the blockchain.
I’ve used ethereum blockchain for building this supply-chain.
The asset involved is obviously the paper. The actors involved are college, evaluators, reviewers, and university.
The college will upload the answer paper of each student into IPFS. The returned hash is stored in the blockchain. So here’s how my implementation works.
![](https://miro.medium.com/max/568/1*8c4nC0wJeFxdhq5QrnA0Zg.png)

This is the basic data structure of the asset involved. When a paper is submitted by the college, from a pool of evaluators randomly two of them are selected and are assigned to the instance of the paper.

![](https://miro.medium.com/max/2000/1*Bgi3PuQpwyQ-qJj2f1o_Ow.png)

Each paper instance is assigned with two evaluators drawn in random from a pool of evaluators.
At any instant, a student can know the status of the paper by calling getResultForStudent along with their id.

![](https://miro.medium.com/max/1400/1*eQg-P304KQsLIUO5EsYgpQ.png)

If their status is marked as evaluated and if the student is not satisfied with the result, he/she can raise a dispute. And from the same pool of evaluators, a random evaluator is assigned the status of the reviewer.

![](https://miro.medium.com/max/1400/1*d5wSJraSudYM7zLBVNOUOg.png)

The reviewer will then review the paper and submit the marks. Later if the student is satisfied with the result, he/she can mark the paper as accepted. And if the student hasn’t raised a dispute, 4 ethers are sent to the evaluators. The one’s how made mistake will have their end of money reduced as penalization. And the money will be sent to the reviewer.
So that’s it.

https://github.com/asishshaji/D-valuation
Running Scripts at Login MacOS
Tags: macos, tips, launchagent
Published: 2020-05-13 12:52:16

---
title: Running Scripts at Login MacOS
published: true
description: A helpful little pro tip
tags: macos, tips, launchagent 
---

# The Problem

Every time my computer restarts and I try to pull a git repo, I get a credentials error.  So I have to open terminal and run:

```bash
ssh-add -KA
```

This command will take your keychain ssh keys and add them to the ssh agent.  The `-K` is not required but if you don't have a passphrase stored for an ssh key already you can enter it now.  I don't recall this being a problem in older versions of MacOS but it is a problem now.

# The Solution

I decided to make use of the LaunchAgent feature.  This feature will run for the current user, at login, either a daemon or one-off scripts.  Here is what you need to do to have the above command run at login.

Create the following script

```bash
#!/bin/bash

ssh-add -KA
```

Place the script somewhere you like

```bash
mkdir -p ~/scripts/startup
# create script in ^ folder
chmod +x ~/scripts/startup/ssh-add.sh
```
Now configure LaunchAgent

```bash
# using sublime text editor to make this file
subl ~/Library/LaunchAgents/com.ssh-add.plist
```

```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>Label</key>
        <string>com.ssh-add.app</string>
        <key>Program</key>
        <string>/Users/kyleparisi/scripts/startup/ssh-add.sh</string>
        <key>RunAtLoad</key>
        <true/>
    </dict>
</plist>
```

Note the program string above should reflect your user.  Make sure you try running it first.  Now every time you login, you no longer need to think about adding ssh keys to your agent.  You could do other things like run docker system prune commands, archive your desktop files, mount a network file system, whatever!  Enjoy!
Flexbox: flex-direction and justify-content
Tags: css, tutorial, frontend, html
Published: 2020-05-13 12:32:33

This post will dive into these two flexbox properties - `flex-direction` and `justify-content`.
For a more practical demonstration of building layouts with flexbox, take a look at the previous post of mine - 
{% link https://dev.to/manangouhari/building-layouts-with-flexbox-40e %}

We're going to see all three properties in action with the help of three boxes.
### 1. `flex-direction` -
{% codepen https://codepen.io/manan21/pen/oNjMoGg default-tab=css,result %}
By default, `flex-direction` is set to `row` if nothing is specified. 
Here's what happens when you set `flex-direction` to `column`.
{% codepen https://codepen.io/manan21/pen/PoPBOEp default-tab=css,result %}
`flex-direction` can be set to following values - 
1. `row`
2. `column`
3. `row-reverse`
4. `column-reverse`

But mostly you'll find yourself using either `row` or `column`.

### 2. `justify-content` - 
It is used to define how is content spaced out along the **main-axis**(main-axis is set by `flex-direction`).

It can be set to following values - 
1. `flex-start` - items are placed from the start of axis
2. `flex-end` - items are placed at the end of the axis
3. `center` - items are placed at the center of the axis
4. `space-between` - items are spread out with the space between them being equal, first item is at start of the axis and the last element is at end of the axis.
5. `space-around` - items are spread out with equal space on either side
6. `space-evenly` - items are spread out with each empty space being equal.

{% codepen https://codepen.io/manan21/pen/BaoPmeY default-tab=css,result %}
Let's also take a look at how these properties behave when `flex-direction` is set to `column`.
{% codepen https://codepen.io/manan21/pen/PoPBEYE default-tab=css,result %}

Well, that is everything that I know about these two properties.
Which more flexbox properties would you like me to explore in future posts?

Also, a reminder: for more practical demonstration of how to build layouts with flexbox and what's the thought process behind it, check out my other blog post - 
{% link https://dev.to/manangouhari/building-layouts-with-flexbox-40e %}
I Started Publishing Web Dev Tutorials at DevTuts!
Tags: javascript, webdev, react, beginners
Published: 2020-05-13 12:31:00

---
title: I Started Publishing Web Dev Tutorials at DevTuts!
published: true
description: I started publishing tutorials under the moniker DevTuts!
tags: javascript, webdev, react, beginner
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/pb67bqzsyvcr1pau5dap.png
---

I hope you all have been enjoying my tutorials here!

I have started publishing my tutorials in a couple different formats under the moniker DevTuts! Super excited to have snagged the domain devtuts.co (still working on getting a site up there), but in the meantime I'm publishing tutorials in both a weekly email format and free YouTube tutorial format!

🎥 [YouTube Tutorials](https://www.youtube.com/c/devtutsco)

📬 [Mailing list](https://buttondown.email/devtuts)

I'd love to hear any feedback you might have!

![devtuts logo](https://dev-to-uploads.s3.amazonaws.com/i/pb67bqzsyvcr1pau5dap.png)
Vim-like Navigation in VSCode
Tags: vscode, vim, ide
Published: 2020-10-03 15:31:25

---
title: Vim-like Navigation in VSCode
published: true
date: 2020-05-12 00:00:00 UTC
tags: vscode, vim, ide
canonical_url: https://tech.serhatteker.com/post/2020-05/vimlike-navigation-in-vscode/
---

My default _text editor_ is __Vim__. However sometimes I use __Visual Studio Code__ for _frond-end_ stuff. I'm already using [VSCodeVim] extension —it is a __Vim__ emulator for __Visual Studio Code__.

Hovewer navigation between `buffers` and `splits` in __Visual Studio Code__ feels counter-intuitive and _windows os-like_. So I want to implement _Vim-like_ navigation: `<Ctrl-h>` to go _left split_, `<Ctrl-l>` to _right split_ etc.

{% youtube Eekuu_qqidw %}

In order to do this add below `key mappings` in your `keybindings.json`:

```json
[
    // Navigate Splits
    {
        "key": "ctrl+h",
        "command": "workbench.action.navigateLeft"
    },
    {
        "key": "ctrl+l",
        "command": "workbench.action.navigateRight"
    },
    {
        "key": "ctrl+k",
        "command": "workbench.action.navigateUp"
    },
    {
        "key": "ctrl+j",
        "command": "workbench.action.navigateDown"
    }
]
```


Also I want to navigate through buffers _Vim-like_:

{% youtube anJhj0Dl7do %}

To achieve this add below settings in your `keybindings.json`:

```json
[
    // Navigate buffers
    {
        "key": "ctrl+m",
        "command": "workbench.action.previousEditor"
    },
    {
        "key": "ctrl+n",
        "command": "workbench.action.nextEditor"
    }
]
```

All done!




[VSCodeVim]: https://github.com/VSCodeVim/Vim
What supouses Deno for front end devs?
Tags: discuss, deno, webdev
Published: 2020-05-13 12:26:58

With all the hype for deno it would be possible to have webpack/parcel on top of deno and remove node_modules for front end dev? At the end when you execute your webpack/parcel starts behind the scenes is calling nodejs. 

Assuming this is possible... If we have imports to urls across our files (instead of regular imports to node_modules) we need the package.json or something similar to control the versions in a centralized spot anyway.

When I say front end dev I thinking this scenario in a create-react-app or something similar client side.
Getting Over the Fear of Looking Stupid
Tags: codenewbie, impostersyndrome, positivity, mentee
Published: 2020-05-13 12:24:17

---
title: Getting Over the Fear of Looking Stupid
published: true
description: 
tags: #codenewbie #impostersyndrome #positivity #mentee
cover_image: https://images.unsplash.com/photo-1484069560501-87d72b0c3669
---

If current me could go back in time and give past me some advice on learning how to code it would be this - **_"Get over the fear of looking stupid!_**"

Asking questions or being afraid to vocalize when you don't understand a concept is a huge barrier to learning. Although it seems easy enough, the fear of being judged is overpowering. This is a huge problem for code newbies and anyone breaking into tech, and to be honest - it's it's a problem I'm just starting to feel comfortable overcoming.

Recently I've been working with a new mentor who is guiding me through building an application that includes the foundations of real-world developer experience. From authentication, to asset management, to webhook integration - it's a lot! And although I am a bootcamp graduate and confident that with his support I will be able to accomplish this, it's pretty scary. 

Imposter syndrome sees this as the perfect opportunity to attack! "You'll never be able to do this", "You'll look stupid asking that question", "He'll figure out you have no clue what you're doing", and worst.. "You're not even close to being ready". But what did I do? Fight back! Imposter syndrome is something we will all deal with, but if something scares us we should push towards it rather than run away - that's growth! 

Yesterday, my mentor and I had a quick but equally helpful meeting. I was nervous to ask questions that I thought would make me look stupid. But, I'm in a great opportunity to learn with an experienced developer who is taking the time to show me the ropes. So I'd be missing out if I didn't push myself to become **_comfortable with being uncomfortable_**. I think that's something we all need to keep in mind:
## discomfort = growth
So keep asking those questions, accepting uncertainty, making mistakes and learning from them. Get over the fear of looking stupid! Programming is not easy, and asking questions doesn't make you stupid!

For anyone who is reading this and is in the position where you are guiding or mentoring someone who is early in their learning, please remember to have patience and make it a safe space for us juniors to learn. I tweeted this the other day after meeting with my mentor (who has been amazing!) and wanted to share it since it's relevant:

![Tweet about mentorship](https://dev-to-uploads.s3.amazonaws.com/i/ot1t8utuk4y9mpvddsx6.jpg)

___
Photo by [Emily Morter](https://unsplash.com/@emilymorter) on [Unsplash](https://unsplash.com)
Magento 2 Marketplace for Extensions & Themes - Apps Marketplace
Tags: magentomarketplace, magentoextensionsstore, magentoplugins, magentothemes
Published: 2020-05-13 12:17:27

Apps Marketplace has 9+ years of market experience, who provide the best Magento 2 extensions & themes for your online eCommerce store including dedicated eCommerce developers, hosting & many services. If you want to make your Magento 2 store & functionality better? Pick right Magento 2 extensions or plugins to boost store performance & best user experience ever. Fully responsive highly user engagement Magento 2 themes & templates for all industries. Hire Magento 2 Developers for your custom eCommerce project on a full-time or part-time basis. One roof eCommerce solutions.
https://www.appsmarketplace.co.in/
Is there a good way to post from .Rmd to dev.to yet?
Tags: rstats, question, devto, blogging
Published: 2020-05-13 12:05:26

I know we have `blogdown` and `distill`, which are great for hosting whole sites. We also have the `github_document` output from `knitr`, which is ok, but a little manual to get something up on the site.

Does anyone know if there is any work being done to publish more effectively to dev.to, or something that I might have missed that is well known?
HOW TO DETECT A MODIFIED PDF FILE
Tags: python, xml, pdf, machinelearning
Published: 2020-05-13 12:02:24

Hi,

I worked with binary PDF structure  (I found that there is an ID key , it change when we update the PDF , but my problem still unsolved when we compress pdf (do the optimization : reduce file size , a new ID key ) so I’m searching if there is a solution or I should transformer pdf to image and maybe  with OCR  I will detect the fraud ?
May 13 — Daily CodeNewbie Check-in Thread
Tags: codenewbie, checkin, beginners, discuss
Published: 2020-05-13 12:00:26

---
title: May 13 — Daily CodeNewbie Check-in Thread
published: true
description: A daily thread to ask questions, share progress, and stay accountable!
tags: codenewbie, checkin, beginners, discuss
series: Daily Checkin
---

You are encouraged to use this daily thread to:
- Ask for help (all questions encouraged)
- Explore topics you’re curious about
- Share something you’ve written or read
- Celebrate your wins
- Stay accountable to your goals
- Support your fellow programmers

Happy Coding!

---

_Interested in joining the twice-weekly live [#CodeNewbie Twitter chats](https://twitter.com/search?q=codenewbie)?  You can find us [on Twitter](https://twitter.com/search?q=codenewbie) each Wednesday at 9pm ET (1am GMT on Thursday) and Sunday at 2pm ET (6pm GMT)!_
Daily Developer Jokes - Wednesday, May 13, 2020
Tags: jokes, dailydeveloperjokes
Published: 2020-05-13 12:00:12

---
title: "Daily Developer Jokes - Wednesday, May 13, 2020"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
cover_image: "https://private.xtrp.io/projects/DailyDeveloperJokes/thumbnail_generator/?date=Wednesday%2C%20May%2013%2C%202020"
published: true
tags: #jokes, #dailydeveloperjokes
---

Generated by Daily Developer Jokes, a project by [Fred Adams](https://xtrp.io/) ([@xtrp](https://dev.to/xtrp) on DEV)

___Read about Daily Developer Jokes on [this blog post](https://xtrp.io/blog/2020/01/12/daily-jokes-bot-release/), and check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/).___
### Today's Joke is...
![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12593f93b65.png)

---
*Have a joke idea for a future post? Email ___[xtrp@xtrp.io](mailto:xtrp@xtrp.io)___ with your suggestions!*

*This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit.*

<!-- 
Joke text:
___Q:___ I love you and I only love you. Does that turn you on?

___AND GATE:___ No.
 -->
Embed your dev.to posts anywhere!🥳
Tags: react, codepen, javascript, webdev
Published: 2020-05-13 11:41:29

###Hey People of Dev! 

Do you have a requirement of embedding your **dev.to** posts in your web-site or any other site? 

I had a similar requirement where I was thinking of embedding my top **dev.to** posts in my personal *github-pages* web site. I could not find any that would suit my requirement. So I went ahead and have built my own solution. 

A react component that accepts a dev username and all that is needed to do is call the react component in your page like so:

```
<DevArticles username="comscience" />
```

And done! 🎉

You have a beautifully laid out row of your dev articles as shown in this codepen below:

{% codepen https://codepen.io/kokanek/pen/RwWJdPr %}

Do play around with it and suggest improvements. Here are some I was thinking:

- ability to limit the number of articles
- ability to limit the number of rows
- ability to sort by max comments and hearts etc.

If you liked that article, you might also like:

{% link /comscience/dynamic-weather-app-using-just-css-cp2 %}

Hope that helped!
Cheers!
Docker Registry v2 Cleanup?
Tags: docker, help
Published: 2020-05-13 11:32:12

If you use Docker you will know that it clogs your disk space rather quickly. We use it in most of our projects, with our own Registry. But the thing is, it clogs up the disk space with obsolete blobs, digests, and manifests... We had over 1 TB of obsolete stuff... 

We have been trying to find an official way of cleaning the registry up, we have found GarbajeCollector although it only works if you remove the references by hand, then it removes the blobs.

My question is, any of you have been able to completely automate the removal of outdated Images aka blobs in the Registry? Or if not, is there any good tool out there? 


### EDIT:
My colleague got it working with GarbajeCollector in the end, although it only works with registry > 2.7 & passing `-m` flag. 

If you have the same problem and need more info please let me now!
Javascript DataTypes
Tags: javascript, beginners, tutorial, webdev
Published: 2020-05-13 10:53:49


In this tutorial, You'll be learning about using datatypes in Javascript.

#### Example

```javascript

let x = 16; //now x is interger
x = 12.65; //now x value is updated to float
x = "JavaScript is Amazing."; //now x value is updated to string
document.write(x);

//output
JavaScript is Amazing.

```

DataType types
--------------

String
------

Strings are a sequence of characters wrapped in double or single quotes. 
Below ways, we can assign Strings.
```javascript
let task_one = "Complete Homework<br>";
//OR 
let task_two = 'Complete Homework<br>';
//OR
let task_three = `Complete Homework<br>`; //this is called string literals

document.write(task_one);
document.write(task_two);
document.write(task_three);

//output
Complete Homework
Complete Homework
Complete Homework

```

String Concatenation
--------------------

#### Using `+` Operator

```javascript
let name = "John";
let age = 25;
let sentence = name+" is "+age+" years old";
document.write(sentence);

//output
John is 25 years old
```

#### Using String Literals
```javascript

let name = "John";
let age = 25;
let sentence = `${name} is ${age} years old`;
document.write(sentence);

//output
John is 25 years old

```

Numbers
-------

Adding two numbers

```javascript
let a=5,b=7;
let z=a+b;
alert(z);
```

Add number and string

```javascript
let a=5;
let b="7";
let z=a+b;
alert(z); //output 57
```

null type
---------

If we don't want to initialize the value to variable than we can use null which basically means nothing.
```javascript
let designation=null
alert(designation); // outputs null
```

undefined type
--------------

If we declare variable but don't initialize its value than the value of the variable will be `undefined`.
```javascript
let name;
alert(name); //outputs undefined
```

Boolean Date-Type
-----------------

Boolean types have two values that are `true` or `false`. We can also assign 1 which means true and 0 which means false.
```javascript
let has_completed_howework=true;
alert(has_completed_howework); //outputs true
```

We can use this for conditional checking
```javascript
let has_completed_howework=true;
if(has_completed_howework==true){
    alert("Student has completed homework");
}else{
    alert("Student has not completed homework");
}
```
I’ve included link to the whole chapter [here](http://thecodelearners.com/javascript-data-types-strings-string-literals-boolean-null-and-numbers/).
Android Sorting CheatSheet
Tags: sorting, android, java8, kotlin
Published: 2020-05-13 10:44:54

---
title: Android Sorting CheatSheet
published: true
description: A cheat sheet to sorting by single or multiple attributes in Android
tags: sorting, android, java8, kotlin
---

# For Kotlin
If there's just one value to compare, then the following can be used
```kotlin
	names.sortedBy{ it.length }
```

The two methods are used to compare the items in the list. If the first one returns equal, then the second will take over

```kotlin
fun arrangeNames(names: List<String>): List<String> {
    names.sortedWith(compareBy({it.length}, {it.length}))
}
```
# For Java
When using java, a comparator object has to be created, these can be chained with `thenBy` calls.
A stream still needs to be created and collected for the result to be calculated.

```java
public List<String> arrangeNames(List<String> names) {
	Comparator<String> sizeComparator = Comparator.comparing(String::length).thenBy(String::length)
	return names.stream().sorted(sizeComparator).collect()
}
```