teleren/devto huggingface dataset:
Fix `ld: library not found for -lgomp` when installing Imagick 3.5 via PHP pecl on Mac
Tags: php, pecl, mac, imagemagick
Published: 2021-06-21 06:14:43

## Update 25 July 2021

As of 22 July 2021, version 3.5.1 is stable in the `pecl` channel and can be used to compile `imagick` for both PHP 7 and PHP 8.

```
pecl install imagick
```

The general command will not fail anymore

## TL;DR

Install the older version (3.4.4) of Imagick forcing it via `pecl`

```
pecl install imagick-3.4.4
```


## Intro

The last version (3.5) of the PHP extension for Imagemagick ( [Imagick](https://github.com/Imagick/imagick) ) introduces a compilation error on Apple systems, which is independent from the PHP version (tested on 7.4 and 8) and Imagemagick version (tested on 6.x and 7.x) and is instead related to the missing/broken support for  [gomp](https://gcc.gnu.org/projects/gomp/) of the gcc compiler.

This is not related to Apple Silicon either, as I've tested on an Intel machine.

## Error

The error is thrown while compiling, after running

```
pecl install imagick
``` 

The complete error is 

```
ld: library not found for -lgomp
```

## Potential Fixes

There are several Stack Overflow threads talking about compilation errors due to Gomp. The most comprehensive I've found  [is this](https://stackoverflow.com/questions/20321988/error-enabling-openmp-ld-library-not-found-for-lgomp-and-clang-errors). 

I've tried few of the fixes proposed in the answer, but most require compiling a different version of gcc,  which would make subsequent updates via homebrew unstable.

Also tried this other  [amazing thread](https://stackoverflow.com/questions/43555410/enable-openmp-support-in-clang-in-mac-os-x-sierra-mojave/48746939#48746939) on Stack Overflow which suggests `llvm` and revised compiler flags, but it didn't work for this specific case, probably due to built-in parameters in the pecl compilation process.

## Actual Fix

In the end the final fix was to downgrade the version of Imagick to 4.3.3, which compiles perfectly.

You can do so either by  [downloading the release](https://github.com/Imagick/imagick/releases/tag/3.4.4)  from github or simply by forcing the version in pecl as follows:
```
pecl install imagick-3.4.4
```
Apply Different Font Styles in Excel Using Java
Tags: java, excel, front, api
Published: 2021-06-21 06:10:59

This article will share how to apply different font styles to the text in Excel cells using a 3rd party free Java API.

**1# Import the Jar dependency of the free Java API**
**Method 1:** Download the free API ([Free Spire.XLS for Java](https://www.e-iceblue.com/Download/xls-for-java-free.html))and unzip it, then add the Spire.Xls.jar file to your project as dependency.

**Method 2:** Directly add the jar dependency to maven project by adding the following configurations to the pom.xml.
```xml
<repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>http://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
</repositories>
<dependencies>
    <dependency>
        <groupId>e-iceblue</groupId>
        <artifactId>spire.xls.free</artifactId>
        <version>3.9.1</version>
    </dependency>
</dependencies>
```

**2# Sample Code**
```java
import com.spire.xls.ExcelVersion;
import com.spire.xls.FontUnderlineType;
import com.spire.xls.Workbook;
import com.spire.xls.Worksheet;

import java.awt.*;

public class SetFontStyle
{
    public static void main(String[] args) {

        //Create a workbook
        Workbook workbook = new Workbook();

        //Get the first sheet
        Worksheet sheet = workbook.getWorksheets().get(0);

        //Set font name
        sheet.getCellRange("B1").setText("Font name: Time New Roman");
        sheet.getCellRange("B1").getCellStyle().getExcelFont().setFontName("Time new Roman");

        //Set font size
        sheet.getCellRange("B2").setText("Font size: 20");
        sheet.getCellRange("B2").getCellStyle().getExcelFont().setSize(20);

        //Set font color
        sheet.getCellRange("B3").setText("Font color: Red");
        sheet.getCellRange("B3").getCellStyle().getExcelFont().setColor(Color.red);

        //Set to bold
        sheet.getCellRange("B4").setText("Font style: Bold");
        sheet.getCellRange("B4").getCellStyle().getExcelFont().isBold(true);

        //Set to underline
        sheet.getCellRange("B5").setText("Underline: Single");
        sheet.getCellRange("B5").getCellStyle().getExcelFont().setUnderline(FontUnderlineType.Single);
        sheet.getCellRange("B6").setText("Underline: Double");
        sheet.getCellRange("B6").getCellStyle().getExcelFont().setUnderline(FontUnderlineType.Double);

        //Set to italic
        sheet.getCellRange("B7").setText("Font style: Italic");
        sheet.getCellRange("B7").getCellStyle().getExcelFont().isItalic(true);

        //Save the result file
        workbook.saveToFile("FontStyles.xlsx", ExcelVersion.Version2016);
    }
}
```

**3# A snapshot of the result document**
![Front Style](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9uth5gg5akcxglrij1ds.jpg)
Get up to $300 AWS credits for free
Tags: aws, cloud, beginners
Published: 2021-06-21 05:44:39

On of the biggest problems while learning Cloud computing and cloud is that everything is paid. While services like Azure has $200 credit for a month and GCP  300$ for 90 days but AWS has nothing. Let me tell you a trick to get free AWS credits for POC or learning.

1. Think of an idea for AWS usage.
  1. Like using an API for product
  1. Using AWS ML services for creating a product
2. Use this link  https://pages.awscloud.com/adoptf90d_GLOBAL_POC-credits.html to register in there POC programme.
![POC programme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dcx50nysta5yq1agi1cm.png)
3. Fill the form with your idea and get $300 free credits for up to 6 months.
Integrating wit.ai with Flutter
Tags: flutter, witai
Published: 2021-06-21 05:27:13

## wit.ai
wit.ai is a NLP engine by Facebook that allows users to convert statements into a queried structural data hence allowing developers to build conversational applications such as chatbots.

![Logo](https://user-images.githubusercontent.com/48415436/122707027-cbacb780-d276-11eb-9fc9-5ce2c1da98c1.png)

To get started you can simply visit [wit.ai](https://wit.ai) and login with your existing Facebook account. You can also make the use of amazing [documentation](https://wit.ai/docs) provided by the wit.ai team.

## Integration

* To add wit.ai to your Flutter app, simply install the [flutter_witai](https://pub.dev/packages/flutter_witai) package from pub.dev.

* Now create a wit object and set it to the `WitManager` class from the package, which consists of 2 parameters namely `utterance`, `headers`.

```
final wit = WitManager(utterance: "hello",headers: "XXXXXXXXXX");
```

Utterance will be your query statement for which you'd be creating a structured data response and headers will be the wit.ai project `SERVER ACCESS TOKEN` which can be found in the settings.

* Call the `fetchLink()` function to trigger the wit.ai function and get the structured JSON response based on whatever utterance query you mentioned.

```
wit.fetchLink();
```

* You can view the results by printing out the json to the console, by setting the `fetchLink()` function to a dynamic variable

```
dynamic response = await wit.fetchLink();
print(response);
```

The response should look somewhat like this:

```
{"text":"hello","intents":[{"id":"985952918880417","name":"search","confidence":1}],"entities":{},"traits":{"wit$sentiment":[{"id":"5ac2b50a-44e4-466e-9d49-bad6bd40092c","value":"positive","confidence":0.5435}]}}

```

* You can now get any values from the response json, such as entities, traits or any such values.

```
print(response['entities']);
```

It's that simple. You can create any Flutter button such as TextButton and then simply call the function within it's `onPressed` parameter to call the wit.ai function. Also remember to use the `async` keyword for asynchronous operations.

You can also take a look at the [example](https://pub.dev/packages/flutter_witai/example) code written in the package.
"Agile" isn't the goal
Tags: agile, practices, productivity
Published: 2021-06-24 11:18:08

---
title: "Agile" isn't the goal
published: true
date: 2021-06-21 00:00:00 UTC
tags: agile,practices,productivity
canonical_url: https://jhall.io/archive/2021/06/21/agile-isnt-the-goal/
---

Books. Conferences. Meetups. Frameworks. Slack channels. Lunch & Learns. Transformations. Even magazines (do people actually read those any more?).

It’s easy to find examples of all of these dedicated to the concept of “Agile.”

But why?

Agile is never, and has never, been a goal of its own.

Agile is a tool. A means to an end.

What end?

Quoting from the [Manifesto for Agile Software Development](https://agilemanifesto.org/):

> We are uncovering better ways of developing software.

So what if we have a way to successfully develop software that isn’t “agile”? Is it wrong?

Of course not. What works is not wrong.

So don’t worry if you’re doing or being “Agile” unless what you’re doing isn’t working. If you have a problem to solve, then maybe Agile (or some other tool) can help. But if you have no problem, don’t try to fix it.

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Set up Rancher - The GitOps way using Flux2
Tags: kubernetes, aws, git, devops
Published: 2021-06-21 05:16:43

These days, when you start installing/configuring any tool or system, you should probably think about doing it in a declarative way - **The GitOps Way** 

beside from saving you a lot of time later on,
this is the right way to have a **single source of truth** which always represents the desired configuration of whatever it is you are managing.

Instead of using a `pipeline` which only runs once any time you make a change, with `GitOps` approach the state of your deployed product will **always** reconcile to the state you declared in your code.

That way, even if you or someone else manually change something directly, those changes will be reverted back to the correct state according to your code, **automatically**.

This is sometimes called `drift detection` or `configuration drift` and it's the best tool for us DeVops engineer in years.  

When I wanted to install Rancher on EKS, I took this path and created this setup using `eksctl` + `Flux2`. 

The result is a one-time written git code, which you can easily use again to re-create both the EKS Cluster & the Rancher installation itself, fully configured with specific customizations.


The full article is [Here](https://awesome.devops-lab.dev/Articles/2021-04-16-setting-up-rancher-gitops/)
It's a straightforward approach to create EKS Cluster and deploy Rancher Server in high available mode with Helm Charts using Flux2

After reading and following the article,
You should end up with these results:

* You can access Rancher UI from your browser with the Endpoint (DNS record) you set for your LB.

* You have a high available Rancher deployed on EKS.

* You didn't have to run kubectl in order to configure components.

* You only use Git repository as a declarative GitOps approach to set the desired state of your apps.

* You can destroy and recreate the entire project easily.
Speedtest your connection in Python
Tags: python
Published: 2021-06-21 04:50:43

Today we'll be building our speed testing service in Python.
We have Speedtest websites like this to test our ping, upload, and download speed for those who don't know.

For today's article, I was looking to automate this since I check it regularly.

I choose Python as the language, seeing I'm trying that out a bit.

## Installing the speedtest-cli in Python

Before we can use this package, we have to install it to become available for us to use.

Use the following command to install it:

```bash
pip install speedtest-cli
```

Now open your python file and start by importing the speed test module.

```python
import speedtest
```

Then we create a new speed test. In my case, I'm assigning it to the `st` variable.

```python
st = speedtest.Speedtest()
```

> Note: be aware running the speed test takes a while, so be patient 🙈

Now let's try our download speed and print it out:

```python
print(st.download())
```

When we run this, we get a long number like this:

```text
55775374.79559286
```

## Making a full Python speed test script

Now that we know the basics of the speed test, we want to receive three elements:

- ping
- download
- upload

I'll be showing you how to get this data and format it nicely.

Starting with the ping, for this to work, we need to define a server to ping. In our case let's choose the best one.

```python
st.get_best_server()
```

After this, we can get the ping to this server by using the following:

```python
print(f"Your ping is: {st.results.ping} ms")
```

Let's go on to download. We have already seen we can get this by calling the `download()` function, but it's unformatted.
Below I'll show you how to format it to `Mbit/s`.

```python
print(f"Your download speed: {round(st.download() / 1000 / 1000, 1)} Mbit/s")
```

We can make the same approach for the upload but use the `upload()` function.

```python
print(f"Your upload speed: {round(st.upload() / 1000 / 1000, 1)} Mbit/s")
```

The full script will look like this:

```python
import speedtest

st = speedtest.Speedtest()

st.get_best_server()
print(f"Your ping is: {st.results.ping} ms")
print(f"Your download speed: {round(st.download() / 1000 / 1000, 1)} Mbit/s")
print(f"Your upload speed: {round(st.upload() / 1000 / 1000, 1)} Mbit/s")
```

And when we run this, it outputs:

```text
Your ping is: 30.97 ms
Your download speed: 64.4 Mbit/s
Your upload speed: 29.2 Mbit/s
```

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Barcode generate using Laravel Framework!
Tags: laravel, barcode, tutorial, barcodescanner
Published: 2021-06-21 04:38:54

Now a days, adding Barcode system in web application is most asking feature. Manually inputting products id for making invoice or finding products is really time consuming and have a chance to make mistake. 

In this situation, Barcode system makes workflow faster and error free!  In Laravel it is quit easy to implement barcode system. Even you don't need any physical barcode reader machine! yah, It's true!

### Topics
- Generate Barcode
- Scanning barcode without physical barcode scanner!

##Generate Barcode
Let's generate barcode first. To do that, add `milon/barcode` package first.

```
composer require milon/barcode
```
Suppose, we have products ID like P-10001, P-10002, P-10003 and so on. To generate custom database ID like this, you can use [Laravel ID generator](https://laravelarticle.com/laravel-custom-id-generator).

**Controller code**
```php
public function barcode(Request $request){
  $product = Product::find($request->get('id'));
  return view('barcode',compact('product'));
}
```

**View code**
```html
<div class="barcode">
    <p>{{$product->name}}</p>
    <p>Price: {{$product->sale_price}}</p>
    {!! DNS1D::getBarcodeHTML($product->id, "C128",1.4,22) !!}
    <p>{{$product->id}}</p>
</div>
```
![barcode](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pasc460jag93gdsenjp.png)
*Note:* Style the `barcode` css class according to your need. Please keep in mind most commonly used barcode sticker for printing barcode is 100x150mm


##Scanning barcode without physical scanner!

After generating barcode basically we need a real physical barcode scanner for scanning barcode from product sticker and feed the code into our application but there is a free solution where you don't need physical barcode reader!

[Barcode Client Server](https://play.google.com/store/apps/details?id=com.learn24bd.barcode) is a free barcode reader android application which can read barcode and send it to your PC. It's free and there is no scan limit!

**How the Barcode Client Server works**
- Install the app for PC [barcode server](https://github.com/haruncpi/barcode-server)
- Download the [Barcode client server](https://play.google.com/store/apps/details?id=com.learn24bd.barcode) from playstore
- Connect the app to PC server application.

Now when you scan any barcode by android app, it'll send scanned code to your PC immediately 👌
EC2 launch types
Tags: aws, devops, cloud, beginners
Published: 2021-06-21 04:38:15

EC2 has on demand use and pricing but if we know our usage we can reduce our costs a lot using various types of instances that are available in the cloud.

Following are the types of instances available in the AWS cloud:-

1. On demand instances
1. Reserved instances
1. Spot instances
1. Dedicated hosts

Let us learn about each of these in detail:-

## On Demand Instances

These are the instances that we are most familiar with and often we can start them on demand and stop them whenever we want. These were mostly used by us in these exercises. In these for all Linux machines we are billed per second, for windows and mac machines we are billed per hour. It has the highest cost but no upfront payment is required we only pay when we use the instance. This is for short term and reliable workloads where you don't now when you want to start or stop using the instance.

## Reserved instances

In these instances we reserve a specific instance(with a specific type) for 1 to 3 years and we can get up to 75% discounts with respect to on demand instances. The discount depends upon reservation period 1 year or 3 years and the upfront cost. If you are willing to pay all upfront you get a bigger discount then of you pay on a later stage. these are used for databases, servers, etc. These are further subdivides into 2 categories

### Convertible Reserved instance

In these instances we can change the instance type like from t2.micro to t2.mini. 

### Scheduled reserved instances

These instances are used within a specific time frame that you reserve like for a fraction of day, week, month. These can used for cron jobs, seasonal demand etc.

## EC2 Spot instances

These instances provide the most cost saving with respect to on demand pricing even up to 90% but we can lost these type of instances at any point of time.

The hourly price for a Spot Instance is called a Spot price. The Spot price of each instance type in each Availability Zone is set by Amazon EC2, and is adjusted gradually based on the long-term supply of and demand for Spot Instances. Your Spot Instance stops running when the spot price exceeds your price provided for the spot instance it is like an auction if someone is willing to pay more he will get that spot instance. 

## Dedicated hosts

These are physical servers that are dedicated to you. No one else work on these servers. I provides a lot of control over the underlying hardware to you. These are the most expensive and are reserved for 3 years. These are mostly used for compliance needs.

So, with this we are done with the basics of EC2. Next we will study how data is stored on various EC2 instances.
Single Responsibility Principle | Explanation using JavaScript Coding Examples
Tags: softwareengineering, systemdesign, cleancode, solid
Published: 2021-06-21 04:37:05

{% youtube 08KdkjwhFwA %}

This video tutorial is all about the Single Responsibility Principle, which is the "S" of the SOLID Design Principles in Software Engineering. The explanation has been given using JavaScript Coding Examples.

Connect with me here:
LinkedIn: https://www.linkedin.com/in/srajangupta/
My Portfolio: https://www.srajangupta.com/
My first experience in deploying Django Restful to Azure
Tags: azure, webdev, django, sqlite
Published: 2021-06-21 04:25:34

My first experience in deploying Django Restful to Azure

So recently my build API based on Django Restful framework. I was not quite familiar with Django even though I could set up the Django code and it needed to be deployed to the server. I Recently had claimed a GitHub student benefit pack and I claimed $100 credit for the Azure student account. 
So I login to the account and started my deployment process by creating an App service. So here are the things that were need for creating an app service.
runtime stack: python 3.7
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/71mxn6ydwrzajwmr2syg.png)
 
I use a free service that serves as the site's requirement 
The project of Django was already uploaded in the GitHub so after creating the app service, it was ready for deployment. In the app, service left sidebar after scrolling there is a deployment section. I choose GitHub as a source so you may choose where you have uploaded it.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5yje9ddzrwkt5wwacphr.png)
After this my site was up and running…
Used OLDSMOBILE Engines
Published: 2021-06-21 04:23:20

Have any real options squared up in your quest for a used Oldsmobile engine for sale in the USA? Let us thank you for visiting our automiles-parts.com website before we reveal that, like everyone else, we can assist you. We thank you sincerely. Here you can avail of the complete details of rebuilt Oldsmobile engines & all models.

USED OLDSMOBILE ENGINES FOR SALE
Your Oldsmobile car most likely requires a replacement or refurbished engine, which is why you've arrived at our website. Your quest is only a subset of your interests. To meet your goals, you have a lot more to face. Engine installation and any maintenance are your real challenge with the understanding that your Olds will only be operable after you fail to look for an engine, funding, ordering, shipping, and technical labor. Success relies heavily on the quality of the Oldsmobile engine you purchase and its initial miles, the present state of the refurbished engines, or the quality of workmanship. Warranties support.

 

Get 25% off on Orders at Autoparts-miles.com - Click Here

 

Perhaps the aims are better fulfilled by purchasing a restored Oldsmobile engine or a remanufactured Oldsmobile engine. Autoparts-miles.com also sells splendid low miles used Oldsmobile engines. Win quotations for FREE right now. Quick outbound delivery if you have agreed to order.

Get the Oldsmobile's VIN while calling.

What shop address do you take into account?

What portion of Oldsmobile? (All the big Oldsmobile components we sell.)

AVAIL USED OLDSMOBILE ENGINES WITH REASONABLE PRICES
It is at this stage in the trip where the majority of the engine maintenance costs can be considered. These activities can be smoothed out by a reputable used engine dealer to have cost savings. Usually, this is precisely where our opponents, by catering to your sense of urgency, call things nice for themselves.

 

Used Oldsmobile Alreo engine for sale

 

If your Oldsmobile is your main vehicle, or if you are going to bust your knuckles in your scarce spare time, the urgency is real for you. You must choose a used engine dealer who has actual availability as well as real pricing quotes at the cost of availability. Know that there is a surplus on the market for regular Oldsmobile engine sizes and the need for urgency to spell extreme prices is categorically incorrect for you. Call the below number and place your order for used oldsmobile engines in USA!!!

 

Get Quote for Free 1-888-855-1808