teleren/devto huggingface dataset:
.ai files on Linux
Tags: linux, pdf, illustrator, ai
Published: 2019-11-28 17:35:00

---
title: .ai files on Linux
published: true
description: Learn how to extract information from .ai files on Linux
tags: linux, pdf, illustrator, ai
---

Designers work with all sorts of programs, and most of them don't run on Linux.

Adobe Illustrator is one of those programs.

If you're a developer on Linux and a designer hands you a .ai file to work with, it's going to make your life difficult.

Here are some tricks I've learned to get what you need out of the illustrator file:


## Adobe Illustrator .ai files are just PDFs

This is great, because it allows us to use various PDF tools to extract the information we need.

We're going to make use of [poppler](https://poppler.freedesktop.org/), a PDF library, to extract some of the information we need.


## Extracting images from an Adobe Illustrator .ai file on Linux

From poppler, we get the `pdfimages` command, which will dump all of the images inside of a .ai file.

Here's the command:

```bash
pdfimages my_file.pdf /output/directory/image-file-prefix
```

Images will be exported as `/output/directory/image-file-prefix-000.ppm`, `/output/directory/image-file-prefix-001.ppm`, etc.

From there, you can open the images and convert them as needed.


## Extracting fonts from an Adobe Illustrator .ai file on Linux

Poppler also gives us `pdffonts` to list the fonts in a .ai file.

```bash
pdffonts my_file.pdf
```


## Extracting vector art from a .ai file on Linux

Unfortunately, I don't have a great solution for this.  It seems that there are tools to export your .ai file to a giant .svg, but there would be many layers within that SVG.

Since the vector you want to export can be complex, and might include multiple layers itself, the user would have to interact at this point in order to choose which layers make up the object we want to export.

Inkscape is one solution, but it is very slow for large .ai files and exporting objects is tedious.

GIMP may be able to do this, but I've not yet discovered the way.  For the moment, I'm just screenshotting the vectors and luckily I haven't needed any transparent backgrounds so far.

_If you have tips here, please comment!_

---

That's all for now.  Follow me here on dev.to or on [Twitter @connorbode](https://twitter.com/connorbode) for more on Linux, Python, VIM, etc.
“Hello, nice to meet you.”
Tags: devops
Published: 2019-11-28 17:22:10

“Hello, nice to meet you.”

Seemingly insignificant words, but coupled with a charming smile and a firm handshake they will make a good first impression to someone you meet for the first time.

Do the exact same thing with, let’s say a police officer, which just has stopped you for a control. It will at least be super weird if it does not get you into trouble.

This is just one of a myriad of examples about why communication is circumstantial.

So why the tag DevOps?

Because communication with people is a key element of solving the complex problems we are facing each day. And adapting a DevOps mindset will demand even more communication than the agile movement already did.

Back when I started my IT career coders were mostly introverts, or in a more ugly term “basement dwellers”. This has changed a lot in the last two decades. Still, from my experience, there are some common misconceptions that IT people have about communication.

1\) Emotions are distracting, facts are sacred.

Life would be so easy if a fact would always hold the same value. But the truth is that the mood of someone presenting something is extremely important. Maybe that person is distracted, because of a very bad event and as a result is even giving false statements. Or a cocky junior developer challenges a disgruntled senior, who in turn will use condescending language, diluting the truth of the statements. In any knowledge transfer of any sorts you have to really understand the involved emotions, if you want to get to the essence of the facts.

2\) Truth is obvious.

The best way to present data is just the numbers, without any explanation. Any person intelligent enough to understand the data should always arrive at the same conclusions. \(Sarcasm off\) A scientific research paper would only consist of the results section, if it would be this easy. Of course there will be an abstract, an introduction, a methodology description, a discussion and a conclusion section. If not even more parts. You have to consider the possible audience which will receive the data and adapt the presentation of the data accordingly.

3\) Manipulation is evil.

While being ethically correct, this mindset is extremely dangerous. Technically every word in a communication is controlling how the recipient will receive the information. So it is extremely complicated to present something in a true neutral manner. To be aware how to manipulate people is rewarding in multiple ways. For one you can spot more easily when people try to manipulate you, also you will understand how you are influencing others. With this knowledge you can more easily force people to look at the facts from different sides. Yes it sounds weird, but you can manipulate people into making more informed decisions. Isn’t it marvelous?

In my opinion it is part of the DevOps objective to strengthen the soft skills and the emotional intelligence. Through this we can create better functioning teams, increase inter-departmental information flow and reach company wide situation awareness.
Creating Memocards and Stackfolio
Tags: imadethis, blockstack
Published: 2019-11-28 17:18:31

I just started creating apps on Blockstack, I would like to request your feedback on my apps, they are still on MVP phase. 

StackFolio
The first one is StackFolio, an encrypted crypto portfolio tracker, it allows you to track your crypto portfolio without worrying about being tracked, your data is encrypted to safeguard your sensitive information. We use Blockstack's encrypted storage when handling your data.

![StackFolio](https://stackfolio.co/banner.png)

https://stackfolio.co/

Memocards
![Memocards](https://memocards.net/logo.png)

The second one is Memocards, it is a simple flashcards application that allow you to create flashcards and study it. It is simple but effective for studying to exams. We also did a stats dashboard where you can follow your progress.

http://memocards.net/

Please feel free to comment any feedback or improvement suggest you have for those apps.
Introducing CodeCast
Tags: startup, product, software, learning
Published: 2019-11-28 17:06:57



{% youtube VFHWQzedDR0 %}

## Why CodeCast?

Livestreaming is great, but with regular screensharing your students are missing half the experience.

### Share Code in real-time

Point CodeCast Studio to any project folder to share the whole directory tree in real-time

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/f5zqtxaco7e2pjum0bv5.png)

### Stream and record your screen

Screenshare and webcam are synced with code changes.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/2x7wzaqouaa03pxb3r1h.png)

### Developer-first experience

Viewers can explore your project tree and customize viewing options in an environment that is intuitive and efficient for learning.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/dn6dkkaceue0wus599ou.png)

## LiveStream with CodeCast Studio

CodeCast Studio is the starting point for providing an incredible learning experience to your students or viewers. It enables you to select one or more project folders to share in real-time as you teach, and can synchronize screenshare and webcam video with the code changes in real-time. We watch for filesystem directly, so CodeCast Studio doesn’t require integration with any particular editor. You keep your normal workflow while providing a better experience for your students.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/1wu9yveoeexk68no96mk.png)

## In-Browser Interactive Learning

Share your cast with a URL, and viewers can explore your project in real-time as it evolves. Our dedicated cast player has the look and feel of a modern text editor with the shortcuts and customizations that developers are used to, then is layered with learning-specific features to help them follow changes in the project. Screen share and code changes can be viewed in parallel, so students can both watch your examples while being able to explore and copy parts of the code to run themselves. Once a live session is finished, the full recorded session is available to replay and study.


![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/qfpjkjjosqj8qz1likyw.png)
C++ the python way
Tags: cpp, beginners, codenewbie, tutorial
Published: 2019-11-28 16:56:20


**Second article in series: Intro to Modern C++**



First article from Intro to Modern C++ series: [here](http://zigabrencic.com/posts/2019-11-12.html)

I keep hearing. But `C++` is so ugly to write. It's not like `python`. Sure. But the `C++` community adapted, and they introduced a few cool tricks that make `C++` more pythonic. To make it clear, all of the syntax mentioned here won't work in older versions of `C++`.

You have element based `for` loops in `C++`:

```
std::vector<double> x = {1, 2, 3};
for(auto &element: x){
    std::cout << element << std::endl;
}
```

`python` version would be:

```
x = [1, 2, 3]
for element in x:
    print(x)
```

Or for a map: key, value. In modern `C++`:

```
std::map<std::string, double> dict = {{"a", 2}, {"b", 4}};
for (auto const&[key, value] : dict)
    std::cout << key << " " << value << std::endl;

```

And in `python`:

```
dict = {"a": 2, "b": 4}
for key, value in dict.items():
    print(key + " " + value)
```

OK true there's nothing similar to `python`'s `enumerate` in `C++` but you can always do:

```
std::vector<double> x = {1, 2, 3};
unsigned int i = 0;
for(auto &element: x){
    std::cout << i << " " << element << std::endl;
    ++i;
}

```
For now that's the best implementation I came up with in `C++` that is "similar" to `python` `enumerate`:

```
x = [1, 2, 3]
for i, element in enumerate(x):
    print( i + " " + element)
```

## So can C++ be completely pythonic?

It’s quite interesting how the languages evolved over time. python was written with the aim to provide a simpler functionality than C++. But now python concepts are migrating into the C++ codebase. Though C++ can never replace python and python can never replace C++. But they can work really well hand in hand if we know how to leverage their strengths. Sure, in python we need to write less code then in C++. But honestly, if I have to type 10 more characters to get 15 times of code execution speed up, I’ll go with C++.

Next week I’ll show you how to bring JSON into the C++ world.
DEV Contributors: THANK YOU!
Tags: gratitude, meta
Published: 2019-11-28 16:32:33

---
title: DEV Contributors: THANK YOU!
published: true
description: 
tags: gratitude, meta
---

Today, I want to highlight the amazing people in our community who have contributed to the DEV codebases. We’ve had over 350+ contributors commit improvements across our web, iOS, and Android apps. Thanks to the help of the our wonderful contributors, we’ve merged over 3000 PRs since we first open sourced in August 2018. We have less than ten engineers on the DEV team, so this amount of feature-building and bug-squashing is truly only enabled because of the community. 

It's been an incredible year and we really just wanted to say thank you to you all. 

Below are the folks who have made 5 or more commits in the past year!


{% user feruzoripov %}

{% user araslanove %}

{% user khenhey %}

{% user mazentouati %}

{% user briwa %}

{% user arun %}

{% user abraham %}

{% user glennmen %}

{% user bolarinwa %}

{% user nickytonline %}

{% user link2twenty %}

{% user cyrillefr %}

{% user aswathprabhu %}

{% user venarius %}

{% user arnellebalane %}

{% user amorpheuz %}

{% user mjraadi %}

{% user johncurcio %}

{% user jeffin143 %}

{% user kdraypole %}

{% user artoodeeto %}

{% user spences10 %}

{% user msfjarvis %}

{% user chickdan %}

{% user striderhnd %}

You can see everyone who has contributed to our repositories: 

{% github https://github.com/thepracticaldev/dev.to %}

{% github https://github.com/thepracticaldev/DEV-Android %}

{% github https://github.com/thepracticaldev/DEV-ios %}

![scooby-applause](https://media.giphy.com/media/8FrC4SFYdOUJE4rjIs/giphy.gif)

Happy Coding!
Plans for 2020
Tags: webdev, gamedev
Published: 2019-11-28 16:28:33

---
title: Plans for 2020
published: true
description: webdev / gamedev plans for 2020
tags: webdev , gamedev
---

This coming year I plan to post much more on dev.to! I'm going to be doing a series for folks who want to build games for the web. Everything will be either vanilla js, CSS, HTML, or using [Svelte](https://svelte.dev/). Topics will include animations, drawing to canvas, and creating web games for mobile. Stay tuned!
Deploying React Webapp to github pages
Tags: react, github
Published: 2019-11-28 15:34:36

## Deploying a react app to github pages

Did you build React app and want to deploy it, following these simple steps you able to deploy and showing the world your amazing app.

I will show how to create and deploy React App using create-react-app and GitHub Pages

**Prerequisites :**<br/>
[GitHub](https://github.com) Account.

Install [Git](https://git-scm.com/) in your machine and [Set up Git.](https://help.github.com/en/articles/set-up-git)

*Make sure you have Node.js and Npm installed in your machine.*

Install [Node.js](https://nodejs.org/en/)

Install [Npm](https://nodejs.org/en/)

Install [Github desktop app]() to easen working with git

**Notice** You’ll need to have Node 8.10.0 or later on your local machine.

Procedure :

1- Clone this [repo](https://github.com/paulodhiambo/ReactApp) to follow along.

2- We need to install [GitHub Pages](https://www.npmjs.com/package/gh-pages) package as a dev-dependency.

*cd ReactPortfolio* <br/>
*run npm install* to install node modules<br/>
*npm install gh-pages --save-dev*<br>

3- Add properties to *package.json* file.

The first property we need to add at the top level *homepage*
 second we will define this as a string and the value will be
  *"http://{username}.github.io/{repo-name}"* {username} is your GitHub username,
   and {repo-name} is the name of the GitHub repository you created it 
   will look like this :

*"homepage": "http://paulodhiambo.github.io/ReactPortfolio"*

Second in the existing *scripts* property we to need to add *predeploy and deploy.*

*"scripts": {
//...
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
}*

````
{
  "homepage": "https://paulodhiambo.github.io/ReactPortfolio", #New
  "name": "tuto",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-scripts": "3.2.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject",
    "predeploy": "yarn run build", #New
    "deploy": "gh-pages -d build" #New
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "gh-pages": "^2.1.1"
  }
}

````


4- Add the repository to the github desktop app as a local repository.

5- Publish the repository to github

6- Now deploy it to GitHub Pages.
just run the following command :
*yarn run deploy* or <br/>
*npm run deploy*

This command will create a branch named gh-pages this branch 
host your app, and homepage property you created in package.json 
file hold your link for a live preview, or you can open the branch 
setting scroll down to GitHub Pages section you will find this:

[Visit deployed app](https://paulodhiambo.github.io/ReactApp)

7- Boom!! you site is live on github pages.
A lesson in in-place sorting: the difference between sorted() and .sort() and why it matters.
Tags: python, beginners
Published: 2019-11-28 15:23:46

I've been volunteering as a mentor on [exercism.io](exercism.io). It's a website for doing mentored code exercises, and I promise it's not satanic in any way.

[Spoiler alert] If you'd prefer to attempt the problem before seeing the solution presented below, head over to [exercism.io](exercism.io).


As I write up suggestions to students who have submitted solutions, I find myself writing things that other people might want to read. For that reason, I'm going to present a representative solution containing an issue that I addressed recently.

Briefly, the problem was to take a list of one player's video games scores and write three functions: One that returns the latest score, one that returns the personal best score, and one that returns a list of the three best scores in order.

First, here's the canonical solution, according to the mentor guidelines.
```python
    def latest(scores):
        return scores[-1]

    def personal_best(scores):
        return max(scores)

    def personal_top_three(scores):
        return sorted(scores, reverse=True)[:3]
```
It's worth unpacking `personal_top_three()` as it's a bit dense.  
`sorted(scores, reverse=True)` returns a sorted copy of the list in descending order. This then feeds into [:3], which selects the first three items (indices 0 through 2, inclusive) and returns them.

Now, here's a representative solution, which resembles some submissions I've seen.

``` python
def latest(scores):
    return scores[-1]


def personal_best(scores):
    return max(scores)


def personal_top_three(scores):
    scores.sort(reverse=True)
    return scores[:3]
```
Take a moment and notice the differences.


It's a good solution, but there's an issue. Here's what I would say to the hypothetical student who wrote this.
>First, I recommend being careful with `.sort()` because it changes the list `scores` in place, meaning that the values stored in the list `scores` will be re-arranged. This can cause unexpected behaviour if scores gets used elsewhere.  
>For example, imagine that someone called `personal_top_three(scores)` then called `latest(scores)`. In this case, `latest(scores)` might give unexpected results.  
>Unless you have a good reason to sort in place, I recommend used `sorted(scores)`, which returns a sorted copy of `scores`, leaving `scores` itself unchanged.
>As an added bonus of using `sorted()` in `personal_best()`, it will allow you to have only one line of function body. Do you see why?  


I hope you found this helpful, and that it piqued your interest in Exercism. I encourage you to try it out as a student, mentor, or both!
How Fog Computing Helps Address IoT Business Challenges
Tags: iot
Published: 2019-11-28 15:13:37

![Fog computing and its role in the internet of things" data-lazy-src=](http://perfectial.com/wp-content/uploads/2019/11/IoT_2-01-scaled.jpg)

IoT, for all its momentum, is still quite nascent. It holds vast promise for businesses (particularly in the manufacturing, energy, healthcare, logistics, and utilities industries) in that it can provide visibility into assets and help react to events faster. But the overwhelming volume, variety, and velocity of data it produces often outstrips bandwidth and exceeds the storage, computing, and sophisticated analytical capabilities of even the most advanced enterprises. Also, the fact that it takes so long for sensor data to travel through a gateway into the cloud, where businesses usually store and analyze it, limits the utility of connected solutions to a large extent.

If an IoT device slapped onto an industrial piece of equipment sends out alerts indicating the possibility of a machine failure, the info is only of value if the firm is able to act on it immediately; if technicians are dispatched too late and fail to take corrective actions in time this might lead to an operational disruption and even a production line shutoff.

In this post, we’ll discuss how low latency, excessive bandwidth consumption, and other IoT business issues can be addressed efficiently through a computing paradigm known as Fog; we’ll explain how data processing can be brought closer to the network’s edge and the immense benefits this brings in terms of core network traffic offloading.

Let’s get to it!

View blog and read more about [IoT Business Challenges](https://perfectial.com/blog/iot-business-challenges/). The post appeared first on [Custom Software Development Company](https://perfectial.com/) Perfectial.
Detailed Analysis of Ukrainian IT Market in 2019
Tags: softwareoutsourcing
Published: 2019-11-28 15:05:15


It’s no secret that outsourcing software development has been a global trend for a while and is nowhere near stopping. In fact, a typical IT budget that goes to outsourcing vendors has risen sufficiently this year. According to a recent Outsourcing Study executed by Computer Economics, in 2019 it has grown by more than 30% compared with the previous year, from 9.4% of the total IT budget in 2018 to 12.7% in 2019. The reasons why these numbers keep progressing might be numerous but what they keep showing is that companies are familiar and comfortable with relying on outsourcing partners.

![The State of IT Outsourcing](http://perfectial.com/wp-content/uploads/2019/11/The-State-of-IT-Outsourcing-01.jpg)

Another interesting shift in the IT outsourcing sector we are witnessing these days is the change of the primary reasons for outsourcing. Traditionally, it was deemed that companies opt for outsourcing as a way to cut budget costs, improve operational flexibility, maybe increase the quality of their services or just augment in-house capabilities. But none of these reasons implied long-term commitment. So what has changed? Today outsourcing is not about saving money and finding a quick fix, today companies are after real partners they can collaborate with, disrupt markets, implement new services companies are not capable of doing by themselves and generally drive innovation and leave their competitors far behind.

View blog and read more about [IT Outsourcing](https://perfectial.com/blog/it-outsourcing-2019/). The post appeared first on [Outsource Web Development](https://perfectial.com/) Company Perfectial.
RubyGems Telegram Bot
Tags: rails, showdev, telegram, ruby
Published: 2019-11-28 14:43:27

---
title: RubyGems Telegram Bot
published: true
description: Bot wrapper for the RubyGems.org API
tags: rails, showdev, telegram, ruby
---

Hi I started a little implementation of a Telegram Bot Around RubyGems.org API. Take a look at https://t.me/rubyg_bot, and give me some feedbacks.

GitHub: https://github.com/davidesantangelo/gemsbot

You can control Bot by sending these commands:

```
/info - type gem name and get some basic information type
/search - type gem name and get an array of active gems that match the query
/gems - type author username and get top 50 gems owned by specified username
/updated - returns the 50 most recently updated gems
/latest - returns the 50 gems most recently added to RubyGems.org
/popular - returns an array containing the top 50 downloaded gem versions of all time
/versions - type gem name and get an array (latest 50) of version details
```

![App Screeshot](https://i.ibb.co/9bQNgPG/Screenshot-2019-11-28-at-16-23-10.png)



A little video demonstration
https://twitter.com/daviducolo/status/1199731530429554688