teleren/devto huggingface dataset:
Packaging equipment M5s

Published: 2020-06-06 04:44:43


Industrial-grade machines designed for light-duty continuous bag sealing applications. FRB-770 will seal bags made with thermoplastic materials including Polyethylene (PE), Polypropylene (PP) and heat-sealable laminations. Capable of sealing a wide range of bags such as stand-up pouches (Doypack), gusseted bags, pillow-type bags, sachets, barriers bags, etc. 

Typical products being packaged with these units include Aggregates, Coffee, Chemicals, Spices, Soaps, Sauces, Snacks, Cookies, Chocolates, Cereals, Dyes, Grains, MREs, Pastas, Pet Food, Pastries, Flours, Parts, Tortillas, Vegetables, and many other products. 

One unique feature of the FRB-770II is that they can be converted for both horizontal and vertical operation, a desirable feature that makes irrelevant the flow characteristics of the product being packaged. These are truly universal bag sealing machines designed to work for most entry-level continuous bag sealing applications where versatility, speed, and dependability are a must.

● All-in-one continuous high-speed bag sealing system

● Equipped with Analog temperature controller.

● Can choose Paint hull or Stainless Steel hull

● Makes strong, professional-looking airtight seals like those made by costly high-speed automatic systems

● Seals thermoplastic materials including Polyethylene (PE), Polypropylene (PP), BoPET (ie. Mylar), and heat-sealable laminations and cellulose (ie. Cellophane)

● Capable of speeds of up to 12 mts/min (40 ft/min) , depending on product/bag seal characteristics

● Seals bags that are standing AND bags that are laying on their side (convertible to horizontal and to vertical operation)

● Includes motorized belt conveyor with synchronized speed adjustment

● Extremely easy to use

Please see more information below:
https://maymocdonggoi.vn/tin-tuc-m5s/huong-dan-cach-su-dung-may-han-mieng-tui-mini-hieu-qua-nhat.html
Your Heroku App Keeps Crashing After Deploy? Tell Me About It
Tags: heroku, servers, api, node
Published: 2020-06-06 04:42:21

Heroku is easy to use, until it isn't. The first day we - a bunch of full stack developers-in-training - were introduced to Heroku in class, we were blown away. 

'That's it?' we asked, bewildered.
'That's it!' laughed our instructor. It was the simplest class ever. Click here, tap here, grant permission there and you have a continuously deployed server. Whew. We took the day off and had fun for the first time in a long time. 

Those beautiful days are long gone now, and in the real world, you'll discover that when Heroku fails, it does so in passively tyrannical ways. It is terser than your room mate. Today, I'm going to run through a list of Heroku errors I've encountered so far and how I solved them. Hopefully this article will save you a trek through several Stack Overflow pages. 

## First, let's keep the main thing the main thing
### Don't forget to process.env.PORT all the things
As you probably know, your local environment uses a hard-coded port number to run your local servers. Things like 'localhost:5000' for example are great on your local machine, but if you leave that hard-coded port in your server, it will become a code H10 HEROKU problem.

As a rule, if you must use port 5000 locally, always use a logical OR to add the heroku environment. 

`const PORT = process.env.PORT || 5000;

That should do it. 

Why is this necessary? Heroku sets its own port at production time, and if you override it with your local configurations, it will throw up it hands in annoyance and quit on you. 

## The notorious Heroku logs
Sometimes you'll encounter a problem where you'll get a code H10 error that says 'MODULE_NOT_FOUND' without seeing what the module is. I'm not sure why, but it often feels like the heroku logs are incomplete. 

This can be a pain in the ass to debug. What module is not found? Where?! These are the questions!

To fix this one, a great thing to do is to open the heroku cli on your favorite terminal. 

Type in `heroku run bash` then `npm start` (if you're using Node js - basically start your server). It will throw the same error as before, but this time more explicitly. Note the errors, exit bash by typing `exit`, implement your fixes, do a `git push heroku master` and do a `heroku restart` and `heroku open` and things should be much better. 

## Procfile 
You typically don't need to manually add a Procfile, since Heroku can read your package.json file to tell where the server file is located. However, sometimes the odds aren't in your favor (usually your fault), and now you explicitly need to tell Heroku where to look for your server.js or index.js or app.js file. 

Whatever the case, this is where you create a Procfile (no extensions - it's like gitignore like that). 

In the Procfile, you'll tell heroku how to find your file, eg:

`web: src/index.js`

HINT: You need a Procfile if Heroku says something like 'cannot find /path/to/file.js' 

That's all for now. I hope this helps at least one person!
What is Persistent Volume (PV) & Persistent Volume Claim (PVC) in Kubernetes?
Tags: kubernetes, devops, beginners, opensource
Published: 2020-06-06 04:38:13

Here, I am covering concepts of `persistent volume` (PV) & `persistent volume claim` (PVC). In the previous [blog](https://dev.to/sagarjadhv23/what-is-deployment-service-secret-and-configmap-in-kubernetes-1pk5) I have covered how to deploy PHPMyAdmin application in kubernetes. PHPMyAdmin application does not have a persistent storage. Hence If MySQL pod die due to some unexpected error for e.g. resource crunch then data stored in database will also get deleted as data by default stored in pod. Pods by default are stateless in nature. Hence to persist MySQL data `PV` &  `PVC` is required.

### Persistent Volume (PV)
Storage provisioned by administrator. Learn more [here](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)

### Persistent Volume Clain (PVC)
Request for a storage by user. Learn more [here](https://kubernetes.io/docs/concepts/storage/persistent-volumes/)

## Architecture

![Architecture](https://dev-to-uploads.s3.amazonaws.com/i/vvwmoqyabngy72l8idb6.JPG)

## Prerequisites:

### Deploy PHPMyAdmin Application
Follow [Deploy phpMyAdmin application on kubernetes](https://dev.to/sagarjadhv23/what-is-deployment-service-secret-and-configmap-in-kubernetes-1pk5) blog

### Go to session_2 directory
```
cd ../session_2/
```

## Step 1: Create NFS share
Reference:
- https://www.linuxbabe.com/ubuntu/nfs-share
- https://vitux.com/install-nfs-server-and-client-on-ubuntu/

I have created NFS mount at `/mnt/share` location on VM with IP `192.168.1.6`

## Step 2: Create Persistent Volume (PV) 
```
kubectl create -f db-pv.yaml
```

## Step 3: Create Persistent Volume Claim (PVC)
```
kubectl create -f db-pvc.yaml
```

## Step 4: List PV & PVC
```
kubectl get pvc
```
```
kubectl get pv
```

## Step 5: Redeploy MySQL deployment
```
kubectl delete deployment db
```
```
kubectl create -f db-deployment.yaml
```
Here `db-deployment.yaml` is updated YAML with volume & volume mounts. Next watch pods.
```
kubectl get pods -n watch
```
Exit once db pod goes into running state.

## Step 6: Go to mount directory and list files
```
cd /mnt/share
```
```
ls -ltr
```
## Demo

{% youtube uUsuHvOohDk %}
PHP Hello World by Katheesh
Tags: hello, php, apache, echo
Published: 2020-06-06 03:58:03

Hi my dear friends, This is my first blog. I will try to write blog to share my tricks and techniques with others.

Today we'll see how to write basic program of php server side scripting..

## 💥 First Step
Need a basic software to run php scripts.
  🎯 Apache server (xampp or wampp or lampp) 
  🎯 A text editor 
  🎯 A browser

## 💥 Second Step
  🎯 Start apache server.
  🎯 Open text editor and type following codes
```php
<?php 
    echo "hello world!"
?>
```
## 💥 Third Step
  🎯 Save the file with .php extension on the apache server root folder (if you use xampp save on Xampp/htdocs).

## 💥 Fourth Step
  🎯 Open Browser
  🎯 navigate to http://localhost/Your folder name/Your file Name

## 💥 Conclusion
If you become a php script developer properly learn basic syntax's of php and need database concepts. 
  
### About Hello world.
"Hello, World!" program generally is a computer program that outputs or displays the message "Hello, World!". Such a program is very simple in most programming languages, and is often used to illustrate the basic syntax of a programming language. It is often the first program written by people learning to code.

### 😍 Have a good day.
Teach state to a 5 year old
Tags: react, webdev, angular
Published: 2020-06-05 11:21:17

State is an often tricky concept for noobs, and here is an attempt to simplify it through a real life example.

State is a snapshot of how things were at a particular point of time. In a web page. Period.

The background might have been blue, the variable hello might have had the value 10, the array might have had 15 elements. All these are part of state at a particular time.

Let's say we have to make a simple counter app, which can just increment and decrement a number on the screen. The click of a particular button will increment, and the other will decrement.

Everytime any of the buttons is clicked, the state of the number visible on the screen changes, and the same is reflected on the screen. 

Similarly, an event happening can also be a state change, such as the change in window size of the browser.

State management is complex because changing state the incorrect way can lead to unexpected results, and is often very hard to debug, since there is no actual syntactic error.

Angular uses libraries like NgRX for state management, and React uses Redux. 

Mutating state means to make changes to the existent state, and it is good practice in React to not modify state directly, as it leads to unexpected views. More info [here](https://daveceddia.com/why-not-modify-react-state-directly/#:~:text=Mutating%20state%20directly%20can%20lead,its%20parent%20re%2Drenders).)

Cheers! Happy coding
Tips keep commit grpah clean 
 when merge in Gitlab
Tags: git
Published: 2020-06-06 03:08:43

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/py2xcdd7kafej35wc260.png)

It it the good way that check two boxes named **Squash commits when merge request is accepted** and **Delete source branch when merge request is accepted** when we merge branch.

This way is valid in developing on local branch for not leaving  miscellaneous commits on graph at the end of the merge.
Draw a Fibonacci Curve with Python Turtle
Tags: python, math
Published: 2020-06-06 02:36:13

Just for fun:

```python
from turtle import Turtle
from random import randint

t = Turtle()
scale = 5

def fib(n):
    if n == 0:
        return 0
    if n == 1:
        return 1
    return fib(n-1) + fib(n-2)

def semi_circle(radius):
    rgb = [randint(0, 255) for i in range(3)]
    t.color(*rgb)
    t.circle(radius, 90)
    
for i in range(10):    
    semi_circle(fib(i) * scale)
```

Result:

![fibonacci curve](https://dev-to-uploads.s3.amazonaws.com/i/r8jhh7onimp041pa0gtv.png)
Why is this 'raw_input' detected as an error in Python?
Published: 2020-06-05 22:39:05

If you get this error, you may be using an old version of <a href="https://python.org">Python</a> or using old documentation.

In Python 3, the `raw_input()` function is no longer available, it's now deprecated.

Python 3 is not backwards compatible with Python 2. You should be using Python 3 or newer. If you have old code, you'll have to port it. (<a href="https://python-commandments.org/python-2-vs-3/">what's different</a>?)

> PEP 3111: raw_input() was renamed to input(). That is, the new input() function reads a line from sys.stdin and returns it with the trailing newline stripped. It raises EOFError if the input is terminated prematurely. To get the old behavior of input()
, use eval(input()).

## input()

Python 3 comes with the method `input()` to take keyboard input. It returns data in the form of a string, so you can do this

```python
    x = input("Enter x")
    print(x)
```

But if you check the type, with `type(x)` it will output that the data type is str. If you do not want that, you can <a href="https://python-commandments.org/python-input-function/">cast the data</a>.

```python
    x = int(x)
```

You can also cast it to a data type directly, if you don't want to do input validation

```python
    x = int(input("Enter x:"))
```

But it's wise to do input validation, a user might do this:

```python
    >>> x = int(input("Enter x:"))
    Enter x:hello
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ValueError: invalid literal for int() with base 10: 'hello'
    >>> 
```

You could create a function for that

```python
    >>> def inputi(s):
    ...     x = 0
    ...     try:
    ...         x = int(input(s))
    ...     except:
    ...         print("Wrong input, type integer.")
    ...         return -1
    ...     finally:
    ...         return x
    ... 
    >>> x = inputi("Enter x:")
    Enter x:5
    >>> x = inputi("Enter x:")
    Enter x:hello
    Wrong input, type integer.
    >>> 
```

If you are new to Python, this is a good starting point <a href="https://pythonbasics.org/">Learn Python</a> or the <a href="https://bsdnerds.org/learn-python/">Python shell tutorial</a>
Secure your Github Workflow
Tags: github, git, devops
Published: 2020-06-06 02:21:54

## TL;DR

Specify commit SHA when setting workflow with Github Actions.

## body

GitHub Actions on GitHub Marketplace is not security checked even official one, therefore developers who write workflow should make sure action safe and describe its commit version SHA from a security perspective.

Otherwise tokens you provided malicious action might be used for mining virtual currency. If you have described actions on yaml according to official description, check that is not specified with tag or branch.
Day 5 - #100DaysofCode - Setting up a Sinatra App
Tags: ruby, 100daysofcode, codenewbie, womenintech
Published: 2020-06-06 01:45:26

Something I struggle with is setting up my text editor/app with the correct file structure to proceed with a project. Sometimes you dont need all the information given in running <a href="https://guides.rubyonrails.org/getting_started.html"> ``rails new APP_Path`` </a> and I was given the following templates -- <a href="https://github.com/thebrianemory/corneal"> corneal </a> and <a href="https://github.com/c7/hazel"> Hazel </a> -- that do come in handy, but sometimes you just want to build it yourself. 

Directory structure:
```
├── config.ru
├── Gemfile
├── Gemfile.lock
├── Rakefile
├── README
├──── app
│   ├──── controllers
│   │   └──── application_controller.rb
│   ├──── models
│   └──── views
│       ├──── layout.erb
│       └──── index.erb
├──── config
│   ├──── initializers
│   └──── environment.rb
├──── db
│   ├──── migrate
│   └──── seeds.rb
├──── lib
│   └──── .gitkeep
└──── public
|   ├──── images
|   ├──── javascripts
|   └──── stylesheets
|       └───── main.css
└──── spec
    ├──── application_controller_spec.rb
    └──── spec_helper.rb
```

So I set up the below if you want to just copy and paste into a terminal:
First ``mkdir app_name`` then ``cd app_name `` 

```
touch config.ru
bundle init Gemfile
touch Rakefile
touch README

mkdir app
mkdir app/models 
mkdir app/views 
  touch app/views/index.erb
  touch app/views/layout.erb

mkdir app/controllers
  touch app/controllers/application_controller.rb

mkdir config  
 touch config/environment.rb 

mkdir db
 mkdir db/migrate
 touch db/seeds.rb
     
mkdir public   
 mkdir public/images
 mkdir public/javascript
 mkdir public/stylesheets
   touch public/stylesheets/main.css
```      

I found it easier to copy and paste the above information to get the files I need in my application going. 

After getting my file structure set up it is important to add all the gems you may require

<a href="http://sinatrarb.com/intro.html"> Sinatra</a> ``bundle add sinatra``

<a href="https://github.com/sinatra-activerecord/sinatra-activerecord"> Sinatra-activerecord </a> ``bundle add sinatra-activerecord``

<a href="https://rubygems.org/gems/activerecord/versions/5.0.0.1"> activerecord </a> ``bundle add activerecord``

<a href="https://www.sqlite.org/index.html"> sqlite3 </a> ``bundle add sqlite3``

<a href="https://github.com/pry/pry"> pry </a> ``bundle add pry``

<a href="https://github.com/jarmo/require_all"> require_all </a>  ``bundle add require_all``

<a href="https://github.com/rtomayko/shotgun"> shotgun </a> ``bundle add shotgun``

then you must run ``bundle install`` 


Feel free to add as many gems that you may require to proceed with your project. After completing that you need to make sure that your files are connected correctly and have the correct information inside of them. I cover that in a future post.
Como automatizar a remoção de artifacts gerados no Github Actions
Tags: github, actions, git, artifacts
Published: 2020-06-06 01:17:57

Nessa semana me encontrei com um desafio: **limpar artifacts no github actions para liberar espaço**. Meus workflows estavam gerando erro porque não havia mais espaço pra subir um artifact.

Eu automatizei o build da versão android de um app desenvolvido em react native, que gera um arquivo **.aab** de aproximadamente **30 MB**. Hoje, o Github Packages disponibiliza **500 MB** no plano free, o que resultou em uns 16 workflows bem sucedidos até que eu esbarrei com esse limite através de um erro.

Veja abaixo meu workflow de build para android:

```yml
name: Build app

on:
  push:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Install npm dependencies
      run: npm install

    - name: Run jetify
      run: npx jetify

    - name: Build android app
      run: |
        cd android/
        ENVFILE=.env.production ./gradlew bundleRelease
        
    - name: Upload android build
      uses: actions/upload-artifact@v1
      with:
        name: app.aab
        path: android/app/build/outputs/bundle/release/
```

Fiz da forma mais primitiva possível: entrei em cada workflow e removi os artifacts gerados.

Mas **não fui inteligente**, com certeza havia alguma maneira de automatizar isso.

Procurei algumas e me deparei com duas possibilidades:

## 1. Usando a API do github

Uma opção era criar um serviço online que rodasse periodicamente e fizesse requisições para a remoção dos artifacts através desse endpoint http: [Delete an artifact](https://developer.github.com/v3/actions/artifacts/#delete-an-artifact)

## 2. Usando uma action pronta

Essa foi a solução que escolhi! Rápida, fácil!

Encontrei uma action pronta no markplace do github: [Purge artifacts](https://github.com/marketplace/actions/purge-artifacts)

Os dois parâmetros principais são:
* A periodicidade
* A definição de um artifact expirado

A **periodicidade** nada mais é do que um cron para definir em momentos o workflow deve executar. A **definição de um artifact expirado** trata-se do **vencimento** de um artifact. Um artifact "vencido" deve ser removido. Isso evita que o workflow remova artifacts recentes que não deveriam ser removidos.

No meu caso, usei "0 0 * * * *" e usei "7 days" como vencimento.

Veja abaixo o novo workflow que criei:

```yml
name: 'Clear old artifacts'

on:
  schedule:
    - cron: '0 0 * * *' # every 00:00

jobs:
  clear-artifacts:
    runs-on: ubuntu-latest
    steps:
      - uses: kolpav/purge-artifacts-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          expire-in: 7days
```

Não vou ter problemas tão cedo com limite de espaço do Github Packages.

Até a próxima!
Get a Web Development Job Without Experience?
Tags: career, beginners, codenewbie, freelancing
Published: 2020-06-07 01:12:24

---
title: Get a Web Development Job Without Experience?
description: COBOL is making waves right now. Many unemployment systems are buckling in the wake of COVID-19, and states need COBOL programmers. New devs hungry for work and wondering if they should chase this new demand and learn the language. In this video, I share why bouncing between the current in-demand technologies can hurt your prospects.
published: true
date: 2020-06-06 00:53:00 UTC
tags: career,beginners,codenewbie,freelancing
canonical_url: https://raddevon.com/articles/get-a-web-development-job-without-experience/
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/2thico48r8ocuzhl7b1w.jpg
---
{% youtube O-p_XIpeERo %}

Video Notes
-----------

This is one of the questions I’m asked frequently. How can I get a web development job without experience. Let me go ahead and spoil the video for you. Your options are:

1. 🤝 Know someone who can give you a job.  
2. 🎓 Graduate from a prestigious engineering program.

Chances are, neither of these are possible for you. That means your dreams of being a web developer are over. Unless…

Unless you could go out and get experience without having the job. Fortunately, you absolutely can. In this video, I’ll go over a few ways you can start getting experience as a web developer BEFORE you have the job.

If you’re looking for a fun way to start getting some experience, check out these [10 project ideas](https://raddevon.com/articles/10-great-web-development-learning-project-ideas/). I'll even give you a jump start on one of the projects with a **free project starter kit**.
This is my First Post
Published: 2020-06-06 00:50:54

# My H1 Header 

I'm very happy with the Dev.to experience, it's very clean and neat.

# فقط لتجربة اللغة العربية

## هل حقاً يدعم اللغة العربية 

## أختبار Mixed languages

أتوقع انه لا يدعم اللغة العربية RTL 
خاصة فى حالة خلط المحتوى العربي و الـ English