teleren/devto huggingface dataset:
QKD as a service
Tags: security, cryptography, xaas
Published: 2022-05-08 09:47:40

QKD as a service is based on key agreement protocols, McEliece Cryptosystem, and encrypted OTP.  Quantum key distribution algorithms will be quantum-resistant.  Quantum Key distribution as a service will cater to multiple users and generate keys in parallel. Quantum key distribution signals can be generated simultaneously and sent using an optical channel. This is using the key management service pattern which is available in Google, Amazon, and Microsoft cloud. The key states are managed through the key management services. The states are generated, used, rotated, and destroyed. QKD as a service helps in avoiding attacks and errors. Qubits cannot be replicated because of the law of physics. The secret key is not saved in the Quantum key distribution data stores. The key security is improved because of not saving the quantum keys.

Quantum keys are based on the photon properties for sharing bits between source and destination. The quantum information is used for the generation of the keys.  The interception of the key is identified as there is a change in the quantum state. The keys which are corrupted will be rejected. The randomness of the keys will be real and hackproof.


Many countries are doing research into developing post-quantum public key cryptography to tackle and  defend real-world communications systems from the threat of a future quantum computer
The  limitations of the existing QKD systems are because of the short effective range of transmission, and the fact that BB84* and similar proposals are fundamentally point-to-point protocols . Some of them are trying to integrating QKDwith classical network devices. This approach invalidates any claimed guarantee of security. Since this is based  on the laws of quantum mechanics, and creates an array of new concerns about the security properties of the ancillary network devices.


The the hardware-based approach is expensive for maintenance. The software can be patched remotely and at a lesser cost. The software can be replaced when it degrades and vulnerabilities are discovered. We are creating a device-independent QKD  which will be a key differentiator in the QKD market space. We plan to constantly work on adding features to tackle quantum resistance. We are working on making QKD handle Denial of Service attacks that are not supported by other QKD systems.
I've created a tiny library connecting Rails and Digdag
Tags: rails, digdag
Published: 2022-05-08 09:34:18

---
title: I've created a tiny library connecting Rails and Digdag
published: true
tags: rails,digdag
---

## What's this?

I've created a tiny library connecting Rails and Digdag.
The library "[mogura](https://github.com/KentFujii/mogura)" is now available.

## What is this used for?

Rake tasks are a way to manage batches in Rails.
However, batch processing tends to bloat the codebase and increase operational costs.

In some cases, introducing a professional Python ETL tool such as Airflow may be a hurdle with learning/building/operating/expenses or recruiting human resources.
In addition, it is often not a realistic option to rewrite the Rails-related domain logic contained in Rake tasks as microservices in Python.
There may be a demand to include a workflow engine within a Rails application.

I have been looking for a way to use the domain logic of a Rails application while still satisfying the requirements of a workflow engine.
And I have come up with the option of creating a tiny library connecting Rails and Digdag.

## Usage

Add the following to your Rails project Gemfile and `bundle install`

```
gem 'mogura'
```

Once the library is installed, try the following command in the root directory of your Rails project

```
$ bundle exec mogura help
Commands:
  mogura help [COMMAND] # Describe available commands or one specific command
  mogura init # Initialize Digdag files
  mogura push # Push Digdag workflows
  mogura version # Prints version
```

`bundle exec mogura init` will create the following files in your Rails project

```
RAILS_ROOT/config/digdag/sample.dig
RAILS_ROOT/app/dags/sample_dag.rb
```

```sample.dig
_export:
  rb:
    require: {{ RAILS_ROOT }}/config/environment
+run:
  rb>: SampleDag.run
```

```sample_dag.rb
class SampleDag
  def run
    puts "Hello Rails #{Rails.env}"
  end
end
```

Commanding `bundle exec mogura push` will register `sample.dig` with Digdag.
By loading the Rails environment from Digdag inside `sample.dig`, you can call your domain logic of the Rails from your workflow.

## Thanks for reading!

Currently, only a single Digdag project can be registered as workflows, but I think it would be better if multiple Digdag projects could be registered.
Also, this library currently allows Digdag operations only from the CLI, but I would like to be able to register and edit workflows from your domain logic of the Rails application.
And I'm actively looking for feedback or contributions to this library, feel free to have new functionality ideas to add! :)
ArJd-Live
Tags: react, node, express, mongodb
Published: 2022-05-08 09:32:59

# **ArJd-Live**
## To visit *ArJd-Live* click [here](https://arjd-live.herokuapp.com)
## Demo video click [here](https://youtu.be/nvcFr3a8WT4)


## **Developed By**:
 ➤ [Jaydip Dey](https://github.com/jaydip1235)

 ➤ [Archan Banerjee](https://github.com/ArchanJS)

 ## **Old Features:**
✅ Users can create their own room as well as share link of their rooms.

✅ All the users in a particular room can update the same code simultaneously at the same time.

✅ If anyone of the room member runs the code, the input and the output will be visible to all the members of that room.

✅ The code snippets on changing the language are updated in real time. Any room can be accessed anytime with the URL or the room ID of that particular room, and can always get and modify the last updated code.

✅ Supports 7 programming languages including C, C++, Java, Python etc.

✅ Users can select themes (github, monokai etc.) according to their choices .

✅ They can also choose the font size.


 ## **New Features:**

✅ Users can convert image to code.

✅ Users can upload any code.

✅ Users can download the code they've written.


## **How to run locally**
➡️ Clone the repository

➡️ Create a config.env file and add MONGO_URI and PORT with your own credentials.

➡️Run **npm install** both inside the client folder and the root folder.

➡️Run **node server** in the root folder and **npm start** in the client folder.

➡️App starts running on port 3000. You are good to code!


## **Screenshots: **

[![arjd-live.png](https://i.postimg.cc/tJMq6cJq/arjd-live.png)](https://postimg.cc/0K71Rc7F)

[![image.png](https://i.postimg.cc/gcVn8Frn/image.png)](https://postimg.cc/3Ww8QqXT)


## Do ⭐ the repo if you like and feel free to contribute by raising PR
flask
Published: 2022-05-08 09:31:52

```py
from flask import Flask 

app = Flask(__name__)

@app.route('/')
@app.route('/index')
@app.route('/home')
def index():
    return "<h1>Hello from Flask!</h1>"
```

templates/includes/footer.html
```html
<div class="container-fluid text-center bottom-container">
    <footer>
        <p>Copyright &copy;2019-2020. Universal Tech Academy. All rights reserved.</p>
    </footer>
</div>
```

templates/index.html
```jinja
{% include "includes/footer.html" %}
```

```jinja 
href="{{ url_for('index') }}"
```
index is function name in routes.py 

```py 
@app.route('/')
@app.route('/index')
@app.route('/home')
def index():
    return render_template('index.html', login=False)
```

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

[GET method ](https://drive.google.com/file/d/1_vhCb8lnS3NSuu2SS2dSp8h_q--bf4QA/view?usp=sharing)
Why we have built our main website in Gatsby + Strapi instead of WordPress.
Published: 2022-05-08 08:46:36


Today WordPress is one of the most reliable CRMs in the world.
I dare to say that this is one of the things that keeps PHP alive.
And for a good reason, with website builders such as Elementor and Divi, Product Marketer jobs become accessible in a drag and drop environment.

### So why Gatsby?
We can say that it's mainly for SSG and speed, but that's not the case.
You can have amazing pre-render plugins to achieve almost the same results.

We are building the 1st open-source notifications infrastructure at https://github.com/novuhq/novu .
Our product is built by the community, and there is no really a product without our community support.
It means it should be fully available for the community to fork, contribute and use.

This is why at Novu, we build everything public, you can find our website and backend source here:
https://github.com/novuhq/website
https://github.com/novuhq/cms

But digging deeper, you can find some other important notes, for example: 

- WordPress suffers from migrations. You won't find websites with both stage and production environments easily implemented.
- Our main application UI is built with React. So it's a lot easier for contributors to dive into the codebase without learning a new framework or language.
- CI/CD is a lot easier, just a few clicks away with Gatsby.
- We can run asynchronous code without using a hacky ubuntu cron jobs.
- We can use our Novu libraries directly with our website.
- We can query our database data easily with GraphQL. For example, have you tried to query wp_posts?


Do you think we have made the right choice?
Should we have gone with WordPress anyway?
Should we have gone with Next.js or Remix?
Let me know what you think.
Linux Installation Problems
Published: 2022-05-08 08:35:46

I'm having trouble getting Linux to work on an old desktop computer. It's an HP Compaq DC5800 tiny form factor PC that's been restored (not by me, but a long time ago). It's powered by an Intel Core 2 Duo E4600 processor, which is a 64-bit processor, however the Windows versions that have worked thus far (Vista and 7) are 32-bit.

Because I'm most comfortable with Debian-based distributions, I tried both x86 and x86 64 versions of Debian and Ubuntu on it. The only success I had was with 32-bit Ubuntu 17.04, however it started failing to boot as soon as I updated it (not a distro upgrade, just ordinary updates).

http://call-bomber.co.in/
One Place for your Social links - LinkHub
Tags: appwritehack, appwrite, hackathon
Published: 2022-05-08 08:23:31


[Instructions]: # (To submit to the Appwrite Hackathon on DEV, please fill out all sections.)


### Overview of My Submission
Hi all,
Here i tried to recreate a platform like [bio.link](https://bio.link/) with next js and appwrite. This is my first time i am working with appwrite, and i am very excited to submit such a project.

#### Features
- User Authentication
- Update social media links
- Update profile Image
- View preview
- Share a short Link

#### Project Duration
Date of commencement: 06/05/2022
Date of Submission: 08/05/2022

### Submission Category: 

Web2 Wildcards


### Link to Code

{% embed https://github.com/devpenzil/linkhub %}

### Project Setup
[Readme](https://github.com/devpenzil/linkhub/blob/main/README.md)

### Additional Resources / Info

#### License
[Appache](https://github.com/devpenzil/linkhub/blob/main/LICENSE)

### Tech stack Used
- Next js
- Appwrite
- Tailwind CSS
- daisy UI

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

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


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

### Conclusion
I know there are some bugs in the app. Its my first time with appwrite and i have only a short period for development.

Thanks dev.to and apppwrite for conducting such an amazing hackathon

👨‍💻 with ❤️ by [devpenzil](https://devpenzil.dev/)
A poor introduction to compilers.(still updating)
Tags: compiler, programming
Published: 2022-05-07 02:21:45

##What is a compiler
The job of a compiler is to turn source code that's written by humans:
```
int i = 0;
i = 10 + 20;
```
into machine code(a bunch of 0s and 1s) that's understood by computers in order to run the program: (say, 8-bit instructions)
```
01110010
01010111
...
```

Usually, the compilation process involves converting the source code into intermediate code called **Assembly Code** first, then further turning the assembly code into machine code. 
The second step is relatively straight forward as it's mostly just a 1-to-1 replacement from assembly instruction to its binary representation.
This blog is largely about how we go from source code to assembly code.

##From Source Code to Assembly
The big picture of this process is as shown below:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pobv36cjv2w70wc5movj.png)

---
###Step1: Lexical Analysis
##### -- turn the source code into a bunch of tokens.

In order to discuss lexical analysis, we should first have a look at what a programming language formally is.

Very much like natural languages(e.g. English), a programming language is just a set of strings(called "**tokens**"), where each string/token is a sequence of symbols allowed in this programming language.
For example, in English, the set of allowed symbols are roughly the 26 alphabets plus the standard English punctuation. Therefore,
> How are you?

is a valid English sentence, while
> H@w are you?

isn't, since "@" isn't a valid symbol defined in the language.

A programming language normally consists of 5 kinds of tokens:
1. **Identifiers**: variable names, function names are both identifiers.
2. **Keywords**: reserved words such as "if", "while" and "return".
3. **Operators**: +, -, <, >, 
4. **Separators**: brackets, comma and semicolon.
5. **Literals**: source representation of a value


The job of this lexical analysis step is to scan through the source code and produce a set of tokens. For example, for a program that only has one line of code:
```
int a = 0;
```
The list of tokens produced after lexical analysis would be something like:

```
[
  Keyword("int"),
  Identifier("a"),
  Operator("="),
  Literal("0"),
  Separator(";")
]
```


###Step2: Syntax Analysis
#####-- given a list of tokens, build a tree to represent the structure of this program.

In order for a sentence to make sense, it must be both **syntactically **and **semantically **correct. The syntax of a program deals with the program structure, while the semantics of a program deals with the program logic. 
For example, the following sentence would be considered syntactically incorrect in general:
> Tom likes.

since the verb "like" is missing its object. 
A sentence could also be syntactically correct while being semantically incorrect. The sentence
> Tom sees sounds.

obviously doesn't make sense, but it's syntactically correct as it consists of the subject, the verb and the object of a sentence.

The syntax rules of a language are called "Grammar", which defines what the structure of a language could be.
Should Technical Managers Be Able To Code?
Tags: discuss, programming, career, elon
Published: 2022-05-08 08:20:55

I just stumbled upon this Tweet from Elon Musk on my timeline and I feel the need to share it. I usually avoid dealing with polarizing topics like this because there are just too many different opinions, but this is just a very important issue to me.

![Twitter thread](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qor1fn7sfj22s0f1pktr.jpg)
[<figcaption>Twitter thread</figcaption>](https://twitter.com/elonmusk/status/1522609829553971200?s=21&t=uiJ-d8oATLwynBIgMGeVhg)

This topic resonates with me so much, and I think it's important coming from one of the most influential people on the planet. 

In my opinion, companies, software and non-software alike, should move towards valuing and promoting technical excellence at all levels of the hierarchy. This is not necessarily about programming, but about having deep technical knowledge in the area you manage.

What you do you think?
7 Productive website for web developers
Tags: javascript, webdev, beginners, productivity
Published: 2022-05-08 08:17:19

Hello devs 🙋🏻‍♀️

Here, I found pretty amazing websites.
These sites will definitely increase your productivity by 100% 🚀

### 1️⃣ [Embeddable Widget Apps for Notion](https://apption.co/)

Add 3rd party apps embed or create a custom embed for your Notion Document.

![app for notion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c1r4s3337f0tdnzo0cnp.png) 


&nbsp;
### 2️⃣ [Carbon](https://carbon.now.sh/)

Carbon is the easiest way to create and share beautiful images of your source code.

![carbon](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8rshgw5uwnecdomqh8rc.png)
 
&nbsp;
### 3️⃣ [Small Dev tools](https://smalldev.tools/)

FREE tools for developers like encoder/decoder, HTML/CSS/Javascript formatters, minifiers, fake or test data generators & much more.

![small dev tools](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jwftsp591av3tlnqyzd6.png) 

&nbsp;
### 4️⃣ [Remove Background from Image](https://www.remove.bg/)

Remove backgrounds 100% automatically in 5 seconds with zero clicks.

![remove background from image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u4kq0kmprtgvt18jlp19.png) 

&nbsp;
### 5️⃣ [Metatags](https://metatags.io/)

Meta tags are specific snippets of text and image content that provide a summary for a webpage.

![matatags](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0wojpiq6rs2jm1ei861c.png) 

&nbsp;
### 6️⃣ [ReadMe](readme.so)

The easiest way to create a README file in minutes visually.

![readme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9zcfk07rcetlodo9ovrc.png) 

&nbsp;
### 7️⃣ [Storytale](storytale.io)

It provides illustrations from the best creators worldwide to designers with limits in time and asset skills. Boost your projects.

![storytale](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mts7hdq8zhpzp1750sq2.png)

Thanks for reading this post!
Hope you found few sites useful here ☺️

<a href="https://www.buymeacoffee.com/suprabhasupi" target="_blank"><img src="https://i.imgur.com/4t25pJE.png" alt="Buy Me A Coffee" /></a>

<table>
  <tbody>
    <tr>
      <td>
        🌟 <a href="https://twitter.com/suprabhasupi"> Twitter</a>
      </td>
      <td>
        📚 <a href="https://gum.co/css-pseudo-class-elements"> Ebooks</a>
      </td>
<td>
        🌟 <a href="https://www.instagram.com/suprabhasupi/"> Instagram</a>
      </td>
    </tr>
  </tbody>
</table>
Engineering Management Tip #3
Published: 2022-05-08 08:00:18

Julie Zhou, in her book [The Making of a Manager](https://www.juliezhuo.com/book/manager.html), highlights the importance of a manager's function in aligning vision and inspiring their team. To nurture a successful team, I believe in three somewhat unconventional principles: maintaining a positive attitude, practicing empathy, and fostering enthusiasm about conquering technical obstacles.

Firstly, a good mood is crucial for proactive leadership; how you feel affects how you interact with others and your ability to effectively manage. Happy people inspire happiness in others, hence it is vital to find personal happiness and resilience to succeed as a leader.

Secondly, empathizing with team members allows managers to understand their struggles. This empathy can help create an environment in which everyone feels enthusiastic about tasks and duties handed over to them. Managers should always assume positive intent in their team because most people deal with issues beyond their immediate working environment.

Lastly, cultivating excitement in the team is crucial for innovation. Managers should focus on aligning team member’s interests with the goal of the team and always look for ways to spark their excitement.

EM Tip #3: effective management begins by maintaining a happy and resilient attitude, practicing empathy with team members, and sparking excitement to drive innovation.

From there mechanisms for feedback and scaling impact (including auditing these mechanisms), as well as critical conversations all become crucial, but that's for another time....
Enjoy Programming-Themed Humor? Here's today's daily developer joke!
Tags: jokes, dailydeveloperjokes
Published: 2022-05-08 08:00:02

---
title: "Enjoy Programming-Themed Humor? Here's today's daily developer joke!"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e1258c4f0d26.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_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:___ What is a computer virus?

___A:___ A terminal illness!
 -->
Optional chaining in Javascript
Tags: javascript, beginners, webdev, es6
Published: 2022-05-08 07:59:52

Optional chaining is a way to safely access nested properties without getting the nasty Uncaught TypeError: Cannot read property "something" of undefined.

Suppose, we have an object such as 

```
const user = {
    name: "Chris",
    details: {
        age: 30,
        email: "chris@xyz.com",
    }
}
```

```
const userAge = user.details.age; // 30
const userStreet = user.details.address.street; // Error !!!
```

Accessing any property of a non-existent property will result in an error. We can easily resolve this error by having multiple checks like

```
const userAddress = user.details.address ? user.details.address.street : null;
```

This just gets uglier if there are more nested properties or if the top-level properties don't exist. I used to use lodash  _.get to resolve this. But javascript has now given us optional chaining to overcome this without using any extra dependency. It just goes like this:

`const userAddress = user.details.address?.street`

The optional chaining `?.` stops the evaluation if the value before `?.` is undefined or null and returns undefined. This is much cleaner than what we had before. Also bear in mind that `?.` just keeps the value optional before it and not after that. The properties after that are accessed regularly.

The optional chaining also works with square brackets and functions like so:

`obj?.[prop]` -> returns obj[prop] if obj exists, otherwise undefined.
`obj.method?.()` -> calls obj.method() if obj.method exists, otherwise returns undefined.
The Brain 🧠 Game : Sudoku
Tags: javascript, webdev, beginners, programming
Published: 2022-05-08 07:50:23

FROM my childhood, I love playing with numbers and mathematical figures. The one being the chess and the other being the Sudoku. The aspiring number game has attracted me the most since many years. Today also solving one, I stucked at one place and lost in the space. Then I realised that, yeah it's kind similar to what coding is. Then I started strengthening myself that yes although I don't know how to do it but I will surely figure it out. And that gives me enough power that, I sat back to my work and guess what by thinking and analysing finally I reached at my result. 

"Don't ever loose hope in yourself. Be persistent what you are doing."