teleren/devto huggingface dataset:
Makers Pre-Course - Week 3
Tags: ruby, beginners, bootcamp
Published: 2019-12-03 08:27:54

So that is it, week 3 is over!

On reflection, the positive trial and error success of the previous week helped infinitely this week. As the questions increased in both complexity and task length, it became apparent that the formula honed last week was the only way to succeed. I still had mind-blanks, rage and massive self questioning (especially during question 7.2 which involved putting user input in a rolling multidimensional array design) however last weeks struggles were this weeks gain.

I knew that through some clever googling, studying of the specific tools required (A beginners guide to Ruby course on Udemy helped massively) and some good old English grit, i would get through it. The feeling of submitting chapter 10 and passing the rspec was joyous.....I actually done it!

I had the chance to meet some more of my course-mates at the end of the week too. This was great as it became apparent that most people shared the same fears, went through the same thoughts and found the same struggles. It's nice to know I was not alone in this spectrum of emotions!


It was great to discuss ideas, techniques for certain questions and gain a different perspective. I am very much looking to start with my fellow cohort and get stuck into this world on a regimented full time schedule. After a weekend off with a well deserved beer, I start the final week of the pre-course, involving some paired coding, brushing up on codewars and completing the makers student directory challenge.

Wish me luck...

David
Right click to explain commands..That's what's next.
Published: 2019-12-03 08:17:27


*With a [foundation of explanations established](https://dev.to/kmdr/establishing-the-foundation-for-feedback-48c6), we are now looking to bring [kmdr](kmdr.sh) more seamlessly into different development workflows. A browser extension will allow users to quickly check what all of the attributes of a command do before copying to the terminal.*

![fig1](https://thepracticaldev.s3.amazonaws.com/i/byg5e4sd9r1e631wk61z.gif)
*Kmdr description webpage in the design phase*

kmdr being in the terminal is particularly handy for those testing their memory of options or getting help via irc; however developers are also finding new commands on their browsers via sites like Stack Overflow or in a projects online documentation. The kmdr web extension is for devs in a “research session” within their browser, who value time over tabs and want concise and accurate explanations of a command ASAP.

The two-steps-away vision is the ability to select a command from anywhere in your browser and `right click` for access to the kmdr description.

The first milestone in the web-extension will be the ability to share kmdr descriptions via a URL provided by the CLI client. Users will be able to send and bookmark the URL of a kmdr description which will be rendered as an orphaned web page.

Invitations to early iterations and access to the browser extension will be coming to folks via our newsletter. [Sign up today](https://kmdr.sh/sign-up). 

Tally-ho!
Establishing the foundation for feedback
Published: 2019-12-03 07:47:19

*The first feature and focus of [kmdr](kmdr.sh) has been to deliver a break down of commands with every attribute explained. After 100 days in the wild, we have a base from which we can now explore new features and engage in more pathfinding. Here’s one view of our road here:*

## kmdr v0.1: Get it out!

We launched able to explain the commands of about 50 programs. The command explanations were sourced from manual pages using an imperfect parser which meant a lot of data needed refinement. The initial release was enough to prove that users 1) found value in easily accessing command explanations, and 2) were willing to install a program in the terminal to access the description breakdown.

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

## kmdr v0.2: The grind

We took on the task of improving the quality of definitions with human verification. This meant comparing the output of our parser with official online documentation when it existed, and `--help` on the occasions docs weren’t available. After doing this, we set to extend coverage. We made a huge list of programs we wanted to cover. We prioritized against what we understood to be the most popular, basing our list on websites like [tldr pages](https://github.com/tldr-pages/tldr), a plethora of articles, and things we ran everyday in our own terminals. We had achieved coverage on 200 programs, organized across [18 categories](https://github.com/ediardo/kmdr-cli#supported-programs), before we had reached a critical mass of users and could iterate instead based on usage and feedback.

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

## kmdr v0.3: Finding patterns

With a log of queries surpassing 2,700 we are now able to invest resources (aka our free time) where we have data to support value-add. We also have the data to support slowing investments and focusing instead on pathfinding. From missing program definitions to OS’s, package managers, and shells to support, usage data and real user feedback helps us prioritize and informs our next steps. We now know what the most popular programs are and know that their descriptions are covered. This knowledge allowed us to extend the learning experience and provide concise examples for these programs. We also are seeing that the [web-based demo](http://demo.kmdr.sh/) accounts for more than 35% of usage. This gives us confidence in our next move toward a GUI.

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

Use kmdr today to better understand CLI commands and be more productive from your terminal. Join the 20% of our users who provide feedback and help us shape the future of this product!

Tally-ho!
Best Python Development Company In India
Tags: hirepythondevelopers, pythondevelopmentcompany, pythonwebdevelopmentcompany, pythondevelopmentservices
Published: 2019-12-03 07:31:38

We are a python web development company that builds scalable and responsive websites and web applications using the latest python frameworks. Our python development services improve your website performance and usability with tested techniques and agile development methodologies



Custom Python Development Services

We are an experienced Python development company that specializes in building high-quality websites and web applications with cross-platform compatibility. Our development team is skilled at using popular python web development frameworks like Django and Flask

Python website development
Web application development
Python CMS development

Python-based AI App Development


Our Python developers implement machine learning algorithms in web development projects to enhance user experiences with smart recommendations. We build scalable and responsive web applications with AI features that enable gamification of website content

Smart recommendation systems
Gamification of online content
AI-based web applications development

IoT App Development

We use the latest development tools and python frameworks to build user-centric IoT applications that improve lifestyle with increased convenience. Our IoT application development services deliver unique user experiences across a wide range of IoT devices

Cross-platform app compatibility
High performance and efficiency


Reach Us at Info@oodlesTechnologies.com

Skype Id: oodles.crm
How to keep a process running even after closing SSH connection?
Tags: linux, bash, ubuntu, devops
Published: 2019-12-03 07:28:50

There are many reasons why you would like to keep a process running even if you close your SSH session.

Here are a few examples:

* Your working day is going to be over soon and you are running a huge database import that's taking a long time to complete, you would not want to stay and wait for the import to complete but just hand over the task to the next person on shift
* You are downloading a huge file and it's going to take a good few hours, you would not want to leave your terminal open and wait, or even worse, you don't want to start all over again in case that your internet connection drops

What I usually do in such cases is to use the `screen` command and run the processes in a `screen` session. That way I could detach from the `screen` session and close my SSH connection and the process would still run allowing me or other people to attach to the session later on and follow up on the process.

Here's a quick introduction to how to use `screen`!

According to the official documentation `screen` is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. When `screen` is called, it creates a single window with a shell in it where you could run commands as normal.

I've noticed that in most cases screen is installed by default, so to check if you have screen installed you could run the following:

```
screen --version
```

If you get `command not found`, then you could install `screen` by running:

* For Ubuntu and Debian:

```
sudo apt update -y
sudo apt install screen
```

* On CentOS:

```
yum update -y
sudo yum install screen
```

Once you have `screen` installed, to start a new `screen` session run:

```
screen -S SOME_NAME_HERE
```

This would spin up a new `screen` and you would be attached to it automatically, inside the screen session run your script. 

After that to detach from the screen session press `CTRL+a+d`.

If you need to attach back to the screen session run and check on your process just run:

```
screen -R SOME_NAME_HERE
```

If you've forgotten the name of your `screen` session or if you've not set a name, you could list all available `screen` sessions by running:

```
screen -ls
```

This is just a really brief introduction on how to use `screen`, I would recommend checking out the official documentation as well:

https://www.gnu.org/software/screen/manual/screen.html

Hope that this helps!
Make a great landing page
Tags: react, vue, css
Published: 2019-12-03 07:15:00

Landing page is the most exciting business encountered in daily development. Maybe you worked hard to make a set of ui skin, but in the end it was buried in thousands of similar works. It looks so rigid that it won't attract attention


If you are using react or vuejs framework, then better. You can use this library, a single line of code can make your website change instantly.

### React libs: [https://github.com/lindelof/particles-bg](https://github.com/lindelof/particles-bg)
### Vue.js libs: [https://github.com/lindelof/particles-bg-vue](https://github.com/lindelof/particles-bg-vue)

demo1 https://stackblitz.com/edit/react-a6pm3w
demo2 https://stackblitz.com/edit/react-bpv9fc
custom1 https://stackblitz.com/edit/react-sop6sx
custom2 https://stackblitz.com/edit/react-v1ou5e


### Install
```
npm install --save particles-bg
```
Usage
```
import React, { Component } from 'react'

import ParticlesBg from 'particles-bg'

class Example extends Component {
  render () {
    return (
      <>
        <div>...</div>
        <ParticlesBg type="circle" bg={true} />
      </>
    )
  }
}
```

Beginners can use it with only a few parameters.

Hope your website will be discoverable among the public
CSS Only Modal using target
Tags: css, ui, purecss, webdev
Published: 2019-12-03 07:07:53

---
title: CSS Only Modal using target
published: true
description: Create a modal using only CSS via the :target pseudo selector.
tags: CSS, ui, pure-css, webdev
---

## Modals are everywhere

Modals are a staple in all web apps and sites. How many times have you pulled for a Javascript library for modals. Or worse, implemented your own. Probably every project you have ever done. I have recently taken the approach of only using Javascript when completely necessary. This has pushed me to explore CSS in a new way. If you need a modal in your web project it is 100% achievable with just CSS. Let's see how!

## Target Pseudo Selector

You may be familiar with pseudo selectors like `:before`, `:after`, `:checked`, & `:nth-child(n)`. These are super useful for every day use. There is one pseudo selector you may not be aware of. The way `:target` works is if the location hash matches an element it will trigger the `:target` pseudo selector on that element. For instance, if my url is `mysite.com#article` the element with the id `#article` will trigger the `:target` pseudo selector. This may seem very simple, because it is! Let your imagination go with it. There are many things you can build with this knowledge, with no Javascript. 

## Pro Tip

This `:target` pseudo selector supports CSS animations and transitions. 
This means you can easily animate between states, this gives you quite a bit of power!

Below is an example of an animating modal with just CSS.

{% stackblitz css-modal file=style.css %}
propety accesing from xml in javascript
Tags: javascript
Published: 2019-12-03 06:38:42

	<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
	   <env:Body>
		  <wd:Get_Time_Off_Plan_Balances_Response wd:version="v34.0" xmlns:wd="urn:com.workday/bsvc">
			 <wd:Request_Criteria>
				<wd:Employee_Reference wd:Descriptor="Sheila Xu （徐舒莘）">
				   <wd:ID wd:type="WID">6f141c57519e4e14a2b7d1650ac39367</wd:ID>
				   <wd:ID wd:type="Employee_ID">21160</wd:ID>
				</wd:Employee_Reference>
			 </wd:Request_Criteria>         
		  </wd:Get_Time_Off_Plan_Balances_Response>
	   </env:Body>
	</env:Envelope>




	property to be read wd:Descriptor. I tried with  
	/env:Envelope/env:Body/wd:Get_Time_Off_Plan_Balances_Response/wd:Request_Criteria/wd:Employee_Reference/@wd:Descriptor  
	but it is coming as null. how do i access it?
	I tried in xpath tester online it is giving me
	Attribute='wd:Descriptor=Sheila Xu （徐舒莘）'
Advent of Code 2019 Solution Megathread - Day 3: Crossed Wires
Tags: adventofcode, challenge, adventofcode2019, spoilers
Published: 2019-12-03 06:28:32

---
title: Advent of Code 2019 Solution Megathread - Day 3: Crossed Wires
published: True
description: It's every ops person's dream! Cable management. Find the ideal wiring for your fuel management system.
tags: adventofcode,challenge, adventofcode2019, spoilers
series: Advent of Code 2019 Solutions
cover_image: https://imgur.com/5EYQOTG.png
---

It's day 3, and we've gone from code interpreters to spatial mapping.

### [Day 3 - The Problem](https://adventofcode.com/2019/day/3)
Looks like someone wasn't very organized when doing the wiring for our fuel management system! While we have the time, let's get in there and untangle the shorting out wires and replace it with its more ideal version.

Part 1 was fairly straightforward, but since I didn't know how to convert this into nice intersecting systems of equation, my brute force solution ran into a heapspace problem.

Part 2 was a bit hairy, because I had to back out one of my optimizations for part 1, which revealed (eventually) an issue with how I was calculating the points it passed through.

Overall I would rate this a fairly difficult day 3!

### Ongoing Meta

#### Dev.to List of Leaderboards

* `120635-5c140b9a` - provided by [Linda Thompson](https://dev.to/lindakatcodes) 

 If you were part of [Ryan Palo](https://dev.to/rpalo)'s leaderboard last year, you're still a member of that! 

If you want me to add your leaderboard code to this page, reply to one of these posts and/or send me a DM containing your  code and any theming or notes you’d like me to add. (You can find your private leaderboard code on your "[Private Leaderboard](https://adventofcode.com/2019/leaderboard/private)" page.)

I'll edit in any leaderboards that people want to post, along with any description for the kinds of people you want to have on it. (My leaderboard is being used as my office's leaderboard.) And if I get something wrong, please call me out or message me and I’ll fix it ASAP.

There's no limit to the number of leaderboards you can join, so there's no problem belonging to a "Beginner" *and* a language specific one if you want.

#### Neat Statistics

I'm planning on adding some statistics, but other than "what languages did we see yesterday" does anyone have any ideas?
Automate a python script with Task Scheduler
Tags: python, tutorial
Published: 2019-12-03 05:42:25

The following is a brief tutorial that makes possible to automate the execution a python script with the Windows Task Scheduler (Windows 7, 8 and 10). 

**Steps**

Open the Task Scheduler and click on the Task Scheduler Library to see the current tasks that are executed. Click on the `Create Task` option from the `Task scheduler library`.

![Task scheduler options](https://i.stack.imgur.com/8IZpn.png)


In the General tab, put the name of your new task and click on the option `Run whether user is logged on or not`, check the option `Run with highest privileges` and make sure to setup the appropriate version of you OS.

![User options](https://i.stack.imgur.com/VsBuk.png)

In the Actions tab, click on the `New button` and type in the following:

In Program/Scripts you need to look up for the `Python.exe` path that the Task Scheduler will invoke to run the python script. In my case, my `Python.exe` path was: `C:\Users\userX\python.exe`.

In Add arguments (optional) you need to type the name of your python script. In my case, the path was:

        `Permissions_dump.py`

In Start in (optional) you need to type the path of the file but without the name of the python script, that is:

`C:\Users\userX\PycharmProjects\1099_vendors_costs`

![Edit options](https://i.stack.imgur.com/XAORA.png)

Click on the `Triggers` tab and select how often you want to execute this task.

![Triggers](https://i.stack.imgur.com/SSkLH.png)

Lastly, test your task to see if it truly works by selecting it from the Task Scheduler Library and doing click on the `Run` option.

![Task Scheduler Library](https://i.stack.imgur.com/lo4Rq.png)

Hope this helps to anyone who is interested to know how to automate simple Python scripts :)
CodingAI helps find a mentors
Tags: mentors, react
Published: 2019-12-03 05:20:07

---
title: CodingAI helps find a mentors
published: true
description: CodingAI helps find a mentors
tags: #Mentors, #ReactJs, #OSS, #opensource 
---

**CodingAI** helps find out dev mentors to help resolve the issue. It is beginning levels of ideas and we can find out Find the mentors based on location and tech stack.

# Features

1. To find the mentors based tech stack and their locations
2. It is fully open source project
3. To earn and learning from both mentors and mentees.
4. It support PWA support for our applications .

# Repo Details

Click :star: if you like the project. Pull Request are highly appreciated.

To help to open source projects follow the below repo.

Github : https://github.com/10secondsofcode/coding-ai

Link : https://mentors.10secondsofcode.com
Deep Compare Of Two Objects
Tags: javascript
Published: 2019-12-03 05:16:03




Object.compare = function (obj1, obj2) {
	//Loop through properties in object 1
	for (var p in obj1) {
		//Check property exists on both objects
		if (obj1.hasOwnProperty(p) !== obj2.hasOwnProperty(p)) return false;
 
		switch (typeof (obj1[p])) {
			//Deep compare objects
			case 'object':
				if (!Object.compare(obj1[p], obj2[p])) return false;
				break;
			//Compare function code
			case 'function':
				if (typeof (obj2[p]) == 'undefined' || (p != 'compare' && obj1[p].toString() != obj2[p].toString())) return false;
				break;
			//Compare values
			default:
				if (obj1[p] != obj2[p]) return false;
		}
	}
 
	//Check object 2 for any extra properties
	for (var p in obj2) {
		if (typeof (obj1[p]) == 'undefined') return false;
	}
	return true;
};
Practical Puppeteer: Playing with Google Translate to translate a text
Tags: puppeteer, javascript, googletranslate, automation
Published: 2019-12-03 05:00:33

---
title: Practical Puppeteer: Playing with Google Translate to translate a text
published: true
description: Playing with Puppeteer to translate a text from one language to another using Google Translate
tags: puppeteer, javascript, google translate, automation
cover_image: https://thepracticaldev.s3.amazonaws.com/i/zj2fr26ba54m6mii3r0q.jpg
---

Today we will play with Puppeteer to control Google Translate service. The scenario is to translate a text from Bahasa Indonesia to English. Language code for Bahasa Indonesia is `id` and language code for English is `en`.

You can adjust the language code with your own.

Technically speaking, I just want to control this URL.

```
https://translate.google.com/#view=home&op=translate&sl=id&tl=en
```
`sl` parameter is language code for source text
`tl` parameter is language code for translated text

Let's play.

## Preparation
Install Puppeteer
```
npm i puppeteer
```

## Sample code
File `google_translate.js`
```js
const puppeteer = require('puppeteer');

(async () => {
	let launchOptions = { headless: false, args: ['--start-maximized'] };
	
	const browser = await puppeteer.launch(launchOptions);
	const page = await browser.newPage();
	
	// set viewport and user agent (just in case for nice viewing)
	await page.setViewport({width: 1366, height: 768});
	await page.setUserAgent('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36');
	
	// define source and target language code
	let sourceLang = 'id', targetLang = 'en';

	await page.goto(`https://translate.google.com/#view=home&op=translate&sl=${sourceLang}&tl=${targetLang}`);
	
	// detect the source textarea for input data (source string)
	await page.waitForSelector('#source');
	await page.waitFor(1000);

	// string that we want to translate and type it on the textarea
	let sourceString = 'Apa kamu sadar kalau muka kamu itu jelek sekali?';
	await page.type('#source', sourceString);

	// wait for the result container available
	await page.waitForSelector('.result-shield-container');
	await page.waitFor(3000);

	// get the result string (translated text)
	const translatedResult = await page.evaluate(() => {
		return document.querySelectorAll('.result-shield-container')[0].textContent;
	});

	// display the source and translated text to console
	console.log(`${sourceLang}: ${sourceString}\n${targetLang}: ${translatedResult}`);
	
	await page.waitFor(1000);
	await browser.close();
})();
```

The code are self explanatory. I set the `headless` option to false, so we can see the browser automation in action.

## Run it
```
node google_translate.js
```

Sample of result are below

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

Ow nice.

I hope you enjoy it. Thank you very much.

Repository of this sample is available at https://github.com/sonyarianto/translate-text-with-google-translate-and-puppeteer

## Reference
- https://pptr.dev/
- https://translate.google.com/#view=home&op=translate&sl=id&tl=en