teleren/devto huggingface dataset:
How to use multiple versions of Python
Tags: python, pyenv, ubuntu
Published: 2018-08-20 06:49:45

---
title: How to use multiple versions of Python
published: true
description: 
tags: python, pyenv, ubuntu
---

My system has `2.7.6` as a default python version and most of my applications runs on it, but one project that I'm working with AWS IoT requires version `2.7.9`. 

I will show how to run multiple versions of python using **pyenv**. 


### Prerequisite
```
$ sudo apt-get update
$ sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev
```

### Install pyenv

Install pyenv with one-liner provided by the automatic installer.
```
$ curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
```
Add following lines at the end of .bashrc file and restart the terminal.
```
export PATH="/root/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
```
**Note** : For `zsh` use .zshrc file.

### Usage
Install python version `2.7.9`.
```
$ pyenv install 2.7.9
```
List all installed python versions.
```
$ pyenv versions
* system (set by /home/ubuntu/.pyenv/version)
  2.7.9
```

Use `2.7.9` version for your project.
```
$ mkdir aws-iot-mqtt
$ cd aws-iot-mqtt
$ pyenv local 2.7.9
```
Now, verify which python version is enabled for current directory.
```
// Inside `aws-iot-mqtt` directory
$ python -V
Python 2.7.9
// Check version in parent directory
$ cd ..
$ python -V
Python 2.7.6
```

**Note**: *Tested on `Ubuntu 16.04` server edition*
Delivery Date Scheduler For Magento 2
Tags: magento, magento2, ecommerce
Published: 2018-08-20 06:13:59

---
title: Delivery Date Scheduler For Magento 2
published: True    
description: Delivery date scheduler extension for Magento 2 allow online store customers to choose their purchased products order delivery date &amp; time as per their convenience from a set of allowed dates.     https://www.appjetty.com/magento2-delivery-date-scheduler.htm
tags: magento, magento 2, Ecommerce
---
Resolving File Paths to Tools on Different Workstations
Tags: vscode, tools
Published: 2018-08-19 21:37:00

---
title: Resolving File Paths to Tools on Different Workstations
published: true
description: "Using symbolic links to resolve discrepancies for tool paths on different systems."
tags: vscode, tools
date: 2018-08-19 21:37
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6hakkhp37th5scnnr64l.jpg
canonical_url: https://terrehbyte.com/resolving-differences-in-tool-paths/
---

 _Cross-posted from my [blog](https://terrehbyte.com/resolving-differences-in-tool-paths/)_

Synchronizing settings between my desktop, laptop, and studio workspace has been amazing for letting me constantly iterate on my development environment setup. I can make one change anywhere and use it to evolve my tools no matter where I'm working.

This is made possible by transferring information via GitHub Gists automatically with [Shan Khan][ShanKhan]'s [Settings Sync extension][VSCSettingsSync]. Unfortunately, support for the use of environment variables in VS Code's settings is but only a [requested feature][VSCEnvVar] for now. This means that while my settings will synchronize, I'll have to adjust the paths every time I download it on any workstation besides the one that uploaded it.

Recently, I found a way to get around this issue: **symbolic links**.

## What is a Symbolic Link?

As a concept, a symbolic link creates a soft link between point A and point B in your file system. Point A represents the "link" while point B provides the "destination". Anything that tries to access point A will work from point B for any subsequent references for directories or files.

![Creating a symlink from 'johnny' to 'terry'](https://thepracticaldev.s3.amazonaws.com/i/i1urknn81jn9875bps08.gif)

Creating one will depend on your operating system and available tools, but the general idea is that you'll use a command-line application. On [Windows 10][SOCreatingSymLinks], this is easily accomplished using `mklink`.

Be sure to be conscious of differences in jargon and terminology, such as the difference between an [NTFS junction and symbolic link][SOJuncVSSymlink]!

[SOCreatingSymLinks]:https://superuser.com/questions/1020821/how-to-create-a-symbolic-link-on-windows-10
[SOJuncVSSymlink]:https://stackoverflow.com/questions/9042542/what-is-the-difference-between-ntfs-junction-points-and-symbolic-links

## Using the Symbolic Link

I did not have the foresight to use the same username on both my desktop and laptop, leading to differences in paths that lead to my user folder. (Windows 10 doesn't help with this at all since it relies on the personal information you provide during first-time startup to create the first user account.) To resolve this, I ended up creating a symbolic link from `C:\Users\terryn\` to `C:\Users\terry\` which solved all of my problems.

[ShanKhan]:https://twitter.com/itsShanKhan
[VSCSettingsSync]:https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync
[VSCEnvVar]:https://github.com/Microsoft/vscode/issues/2809
What backend are you using?
Tags: askdev, backend, discuss
Published: 2018-08-19 19:33:35

---
title: What backend are you using?
published: true
description: Node? PHP? Ruby?
tags: askdev,backend,discuss
---

As technology evolves, our stack does, and it brings an important decision to make when selecting your stack to use!

**What backend are you using? What services do you connect to it and why (eg database, redis, elasticsearch, etc)?**

Also, **do you have an elevator pitch on why people should give the framework a try? or, why they shouldn't?**
Version Management for Ruby, Python, Node and Rust
Tags: ruby, rust, python, node
Published: 2018-08-28 19:15:27

---
title: Version Management for Ruby, Python, Node and Rust
published: true
tags: ruby,rust,python,node
canonical_url: https://booyaa.wtf/2018/version-management-ruby-python-node-rust
---

Here's a handy cheat sheet if you find yourself needing an exotic version of Ruby, Python, Node or Rust. Other version management tools are available for ruby, python and node, I just happen to like these ones.

| Action                            | Ruby                 | Python               | Node                            | Rust                               |
|-----------------------------------|----------------------|----------------------|---------------------------------|------------------------------------|
| List available versions to install|`rbenv install --list`|`pyenv install --list`|`nvm ls-remote`                  | n/a                                |
| Install specific version          |`rbenv install 2.5.1` |`pyenv install 3.6.6` |`nvm install v10.9.0`            |`rustup use nightly-2018-08-01`     |
| List locally installed versions   |`rbenv versions`      |`pyenv versions`      |`nvm ls`                         |`rustup show`                       |
| Pin a project to a version        |`rbenv local 2.5.1`   |`pyenv local 3.6.6`   |`echo v10.9.0 > .nvmrc ; nvm use`|`rustup override nightly-2018-08-01`|
| Set global version                |`rbenv global 2.5.1`  |`pyenv global 3.6.6`  |n/a                              |`rustup default nightly-2018-08-01` |

## Python virtual environments

This assumes you've pinned your project to a specific version of python.

```shell
# create an virtual environment
pyenv virtualenv thingy
# activate!
pyenv activate thingy
# do your thang!
pip install pylint black pytest
# exit virtual environment
pyenv deactivate
```

## Rust components (standard libraries, RLS, clippy)

Components will install for the active toolchain (stable, nightly, beta)

To install RLS: `rustup component add rls-preview rust-analysis rust-src`

To install clippy: `rustup component add clippy-preview`

## Rust docs

Did you know you always get an off-line copy of the Rust documentation (language reference, standard library and the Rust book) suite when you install a toolchain? To open it for the active toolchain: `rustup doc`
We Might Face The Crisis of Creative People in Next Few Years as our young generation is stuck in Just Googling Things
Tags: discuss, crisis, humanity
Published: 2018-08-19 14:25:13

---
title: We Might Face The Crisis of Creative People in Next Few Years as our young generation is stuck in Just Googling Things
published: true
tags: discuss, crisis , humanity
---

Teenagers are addicted to Social Networks, Grownups are addicted to money but as a result we are loosing creativity. In near future human civilization might face shortage of creative people.

We have much more friends on Facebook but no real friends. Our teenagers (even some kids under 13) are busy with their smartphone. 
If you go to playgrounds or parks you'll merely see a teenager who's not looking into their smartphone screen.

Kids nowadays don't goto playgrounds at afternoon. Usually they spend the time doing the homework or playing games.

So Is It the bitter truth that we might face shortage of Creativity?
Laravel LogNotify
Tags: laravel, php, showdev
Published: 2018-08-19 14:07:33

---
title: Laravel LogNotify
published: true
description: Laravel Flash Messages Package
tags: laravel,php, showdev
cover_image: https://raw.githubusercontent.com/sarfraznawaz2005/lognotify/master/screen.jpg
---

Laravel package to automatically show notifications in real-time whenever there is new log entry made anywhere in application.

{% github https://github.com/sarfraznawaz2005/lognotify %}
Explain Blockchains, Cryptocurrencies Like I'm Five
Tags: explainlikeimfive
Published: 2018-08-19 13:56:35

---
title: Explain Blockchains, Cryptocurrencies Like I'm Five
published: true
tags: explainlikeimfive
---

Cryptocurrencies and Blockchain are getting huge spotlight from last few years.

I googled, read some articles but couldn't understand how these things actually work.

I want to understand how Cryptocurrencies and Blockchains actually work!

Thank You 😀
Build an HTTP Server
Tags: node
Published: 2018-08-20 05:36:32

---
title: Build an HTTP Server
published: true
tags: node
canonical_url: https://flaviocopes.com/node-http-server/
---

Here is the HTTP web server we used as the Node Hello World application in the [Node.js introduction](https://flaviocopes.com/nodejs/)

```js
const http = require('http')

const port = 3000

const server = http.createServer((req, res) => {
  res.statusCode = 200
  res.setHeader('Content-Type', 'text/plain')
  res.end('Hello World\n')
})

server.listen(port, () => {
  console.log(`Server running at http://${hostname}:${port}/`)
})
```

Let's analyze it briefly. We includes the [`http` module](https://nodejs.org/api/http.html).

We use the module to create an HTTP server.

The server is set to listen on the specified port, `3000`. When the server is ready, the `listen` callback function is called.

The callback function we pass is the one that's going to be executed upon every request that comes in. Whenever a new request is received, the [`request` event](https://nodejs.org/api/http.html#http_event_request) is called, providing two objects: a request (an [`http.IncomingMessage`](https://nodejs.org/api/http.html#http_class_http_incomingmessage) object) and a response (an [`http.ServerResponse`](https://nodejs.org/api/http.html#http_class_http_serverresponse) object).

`request` provides the request details. Through it we access the request headers and request data.

`response` is used to populate the data we're going to return to the client.

In this case with

```js
res.statusCode = 200
```

we set the statusCode property to 200, to indicate a successful response.

We also set the Content-Type header:

```js
res.setHeader('Content-Type', 'text/plain')
```

and we end close the response, adding the content as an argument to `end()`:

```js
res.end('Hello World\n')
```
What all these years of Android Development have taught me the hard way
Tags: android, buddingdevs, keynote, pakistan
Published: 2018-08-19 12:14:50

---
title: What all these years of Android Development have taught me the hard way
published: true
description: AndroidDevFest. Islamabad, Pakistan
tags: Android, BuddingDevs, Keynote, Pakistan
---

This was my humble effort to share insights and learnings from my career and things I wish I would have known back in the day. There will be advice, rant, anecdotes, things which worked for me and how Android developers can step up their game.

This keynote was given at AndroidDevFest event on 31st March, 2018 in Islamabad, Pakistan. I was really happy to see a house-full event and meet so many passionate Android devs from the twin cities. Unfortunately, it wasn't recorded but I thought to share the slides at least. 

Feel free to share your feedback. 

{% speakerdeck 68a88f909e684780911573531866dea0 %}
3 days, 370 commits to master, 399 commits to all branches And a Disaster
Tags: kerala, agile, flood, donation
Published: 2018-08-19 10:36:22

---
title: 3 days, 370 commits to master, 399 commits to all branches And a Disaster
published: true
description: This is the story https://keralarescue.in/ 
tags: Kerala, agile, flood, donation 
---

Reason:

In August 2018, severe flooding affected Kerala state in India due to unusually high rainfall during the monsoon season. Kerala's worst floods in nearly a century, over 330 people died while at least 661,000 were displaced and all 14 districts of the state, were placed on high alert. 

Development:

Kerala IEEE chapter and other developers came up with a plan to coordinate all rescue and relief operations. There was no room for agile or scrum just git issues and git pull request and aggressive development. The site became helpful and still more people using the same website for requesting food and water. the developers work day night voluntarily.

From Github
Excluding merges, 75 authors have pushed 370 commits to master and 399 commits to all branches. On the master, 124 files have changed and there have been 5,264 additions and 176 deletions.

Repo: https://github.com/IEEEKeralaSection/rescuekerala and MIT licensed.


Well I know it will not be a good time to ask about a donation, but in fact, I should have to ask for a donation cause the total loss of around 2 billion Rupees.
https://donation.cmdrf.kerala.gov.in/
Let's Get Your Own Free Domain
Tags: internet, free, html
Published: 2018-08-19 10:14:30

---
title: Let's Get Your Own Free Domain
published: true
description: In the era of Internet everyone needs online presence but to have online presence you need a website or blog and have a website you need a domain. Let's find out to get a free domain
tags: internet, free , html
---

![.](https://palash.tk/assets/images/get-free-domain.jpg)

In the **era of internet** everyone wants their online presence , but having an online presence is not so simple as it seems. To have your own website , you should have a domain name otherwise it would be like yourname.blogspot.com or yourname.wordpress.com

Domain names such as .com , .me , .io , .org are not free, they usually have a huge price range which might not be affordable for you. So today I'm going to share some services which provides free domain names.

![.](https://media1.tenor.com/images/841aeb9f113999616d097b414c539dfd/tenor.gif?itemid=5368357)

But always remember in this world everything costs so if you're getting a free domain you should use it only for testing because free domains have so much disadvantages. I would recommend getting a paid domain from services such as namecheap spending few bucks.

> Disclaimer : I do not endorse any websites listed above and I’m not liable for any damages occurred to you by using these services. Use these websites at your discretion.

## • .TK .CF .ML .GA .GQ

With **freenom** you can plenty of free domains such as **.tk , .cf , .ml , .ga, .gq** without the need of any credit card or financial information.

Just Register at <https://freenom.com> and search for your preferred domain then buy it for free.

> Some people claimed that freenom took their domain and demanded money , I don't think that's true because as you can see this blog is even using .tk domain (okay , okay , I used .tk as an experiment that google indexs all sites which got some pretty impressive contents , no matter which domain you're using)

visit <https://freenom.com> and get a free domain today

## • .DX.AM

Provided with awardspace free web hosting.

It comes with a very useful control panel and much more useful features as well as free web hosting.

To Get a free .dx.am domain visit and register here <https://www.awardspace.com/free-web-hosting-registration/>

## • .CO.NF

With Biz.nf you can get a free **.co.nf** domain. 
They also provide free web hosting.

To get a free .co.nf domain visit <https://www.biz.nf>

## • .CO.NR

To Get a Free .co.nr visit <http://www.freedomain.pro/>

The Service provides URL forwarding, URL masking, Path forwarding for free!

## • .COM.NU & 500+

.com.nu is similar to other free services but beside .com.nu you can also choose other selected domains also for free.

To create a .com.nu and other 500+ domain extensions, visit <http://www.com.nu>
......

---
If You Like My Work (My Articles, Stories, Softwares, Researches and many more) Consider [Buying Me A Coffee ☕](https://www.buymeacoffee.com/palash) 🤗
BxJS Weekly Episode 24 - javascript news podcast
Tags: javascript, node, podcast, news
Published: 2018-08-19 09:43:26

---
title: BxJS Weekly Episode 24 - javascript news podcast
published: true
description: Listen to the best javascript news of the week in a podcast form
tags: javascript, node, podcast, news
---

Hey dev.to community!

BxJS Weekly Episode 24 is now out! 🚀
Listen to the best javascript news of the week in a podcast form right here.
You can find all the mentioned links [here on github](https://github.com/BuildingXwithJS/bxjs-weekly/blob/master/episodes/Episode-24-2018-08-18.md).

You can also watch or listen to this episode on:
- [YouTube](https://youtu.be/o27A7E1Mlvk)
- [Castbox](https://castbox.fm/episode/BxJS-Weekly-Ep.-24-Aug-18%2C-2018-(javascript-news-podcast)-id1378315-id89055628?country=us)

There was also Soundcloud, but it no longer allows to upload due to time limit. Any other suggestions are welcome!

Any feedback is appreciated 😁

Additional stuff:
- [Twitch channel](https://www.twitch.tv/yamalight)
- [Discord server](https://discord.gg/hnKCXqQ)
- [BxJS Weekly github repo](https://github.com/BuildingXwithJS/bxjs-weekly)

Social media links:
- [Twitter](http://twitter.com/yamalight)
- [Medium](https://medium.com/@yamalight)
- [Github](http://github.com/yamalight)

If you enjoy my content, please consider [supporting me](https://codezen.net/support.html) 😉
Tinkering workshop for girls
Tags: tinkering, robots, womenintech
Published: 2018-08-19 08:56:41

---
title: Tinkering workshop for girls
published: true
description: Art bots tinkering workshop for girls with Future Legends
tags: tinkering, robots, women in tech
---

Some months ago I joined an organization called Future Legends in Berlin whose aim is to teach girls aged 6-10 about technology, be it programming, physical interphases, body language and confidence. The objective is to help close the gender gap in technology for the next generation. We want more women in tech!

Yesterday I co-tutored in the first session, we teached the girls some basic electronic principles: what is a motor, what is a battery, what is a closed circuit, and how we can put all these principles together to make an art robot. A robot that draws with its marker legs. 

They also got to decorate their robots using googly eyes and markers. This way we showed them that technology is also fun and open for creativity. It can also be used to do arty stuff. 

Here are some pictures of this great experience:


![alt text](https://thepracticaldev.s3.amazonaws.com/i/b4rwwavv7kf3kjlolgcq.JPG "Artbots Tinkering Workshop")

![alt text](https://thepracticaldev.s3.amazonaws.com/i/r76f38qqo43oshu4iw6i.JPG "Artbots Tinkering Workshop")

![alt text](https://thepracticaldev.s3.amazonaws.com/i/5wa3iw6ogl8wm4d25l96.JPG "Artbots Tinkering Workshop")

![alt text](https://thepracticaldev.s3.amazonaws.com/i/n0o38djweuuz7aan51sw.JPG "Artbots Tinkering Workshop")

![alt text](https://thepracticaldev.s3.amazonaws.com/i/m2ayhdpkqr8cy99nbt9w.JPG "Artbots Tinkering Workshop")

![alt text](https://thepracticaldev.s3.amazonaws.com/i/bfdgbjulrxejjq4qy7d6.JPG "Artbots Tinkering Workshop")

And here two videos of the little bots in action:

[![](http://img.youtube.com/vi/lF3sq3Q2OBE/0.jpg)](http://www.youtube.com/watch?v=lF3sq3Q2OBE "Future Legends Artbots tinkering workshop for Girls")

[![](http://img.youtube.com/vi/g3NGw5QyG_8/0.jpg)](http://www.youtube.com/watch?v=g3NGw5QyG_8 "")




Some of the bots were so balanced that they drawed like spyrographs. It was so cool, took me back to when I was a kid. I got very excited. 

If you are in Berlin bring your daughters to the workshops, they are for free!

You can find all the info at the [Future Legends Facebook page](https://www.facebook.com/futurelegendsberlin/).
Messaging and social network features SDK. What do you think?
Tags: discuss, sdk, webapp, mobile
Published: 2018-08-19 08:45:36

---
title: Messaging and social network features SDK. What do you think?
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/91uzj5yfdmer51c9ps65.jpg
tags: #discuss #sdk #webapp #mobile
---

Quick intro: [MySocialApp](https://mysocialapp.io?ref=devto-discuss) is a library that brings social network features to any apps in a few hours instead of months.

Here the main features:

* [News Feed / Activity Stream](https://docs.mysocialapp.io/v1.0/reference#news-feed-activity-stream-1)
* [Comment](https://docs.mysocialapp.io/v1.0/reference#list-comments-from-post) / [Like](https://docs.mysocialapp.io/v1.0/reference#news-feed-list-likes-from-post)
* [Private Messaging](https://docs.mysocialapp.io/v1.0/reference#private-messaging-1)
* [Notification](https://docs.mysocialapp.io/v1.0/reference#notification-1)
* [Real time notification](https://docs.mysocialapp.io/v1.0/reference#receiving-notification-event-1)

[Full features documentation is here](https://docs.mysocialapp.io/reference)

Code example:

```java
// message with user mention + hash tag
String message = "Hello, my name is [[user:" + myProfile.getId() + "]] this is a post with an image and #hashtag :)";

// build message
FeedPost post = new FeedPost.Builder()
        .setMessage(message) // add text message
        .setImage(new File("/tmp/my_image.jpg")) // add image
        .setVisibility(AccessControl.PUBLIC) // set post visible from all
        .build();

// publish post on public feed
Feed feed = session.getNewsFeed().create(post);

// like the post
feed.addLike();

// build comment
CommentPost comment = new CommentPost.Builder()
        .setMessage("Here a comment") // add comment message
        .setImage(new File("/tmp/my_image.jpg")) // add comment image
        .build();

// comment the post
feed.addComment(comment);
```

Here a quick demo of an app at 100% with MySocialApp API
{% youtube _FSg-1aEKkw %}


# Why should you use MySocialApp?

1. Add social features to any app in a few hours instead of months
2. API integration with your services (Web hook, Web socket, Push APNs + FCM, RESTful)
3. Focus on what makes your app unique and save a lot of time

# Languages

We support 3 languages (Java, Swift, Kotlin) and 2 frameworks (iOS, Android) at the moment. We will support 8 languages + 5 frameworks at the end of the year.

# Question

What is your opinion about this service? Is this something you could need in the near or distant future? Your feedback is essential to me. Thank you